Auth0 Invalid API Key Error Occurs With Self-Managed Custom Domains
Last Updated:
Overview
An Invalid API Key error occurs in an Auth0 tenant using a self-managed custom domain when the cname-api-key is incorrect or missing. Resolve this issue by updating the proxy configuration with the correct cname-api-key value. This error typically presents as a sudden gap in requests from the custom domain, while requests using the Auth0 canonical domain remain unaffected.
Auth0 generates the following error message:
Invalid API Key.
Applies To
- Auth0
- Self-Managed Custom Domain
Cause
The error occurs because the cname-api-key is incorrect or missing for a self-managed certificate custom domain. This often happens if unintentional updates in the proxy change or remove this secret.
Solution
How is the "Invalid API Key" error resolved?
Review the proxy configuration settings and replace the missing or incorrect cname-api-key secret with the expected value.
- Access the proxy configuration and locate the
cname-api-keysecret. - Update the
cname-api-keywith the expected value.