err:frontline:client:missing_credentials401 Unauthorized.
Example response
If you’re calling an API hosted on Unkey
Send your API key where the API expects it. Unless the owner told you otherwise, that’s theAuthorization header as a bearer token:
- The
Bearerprefix is missing. It isn’t case-sensitive, but without it the header is ignored. - The header is there but empty. That counts as missing.
- The owner uses a custom header or query parameter. Use exactly the name they gave you.
- You don’t have a key. Only the API owner can issue one.
If you own this API
Your key-auth policy lists where to look for the key: theAuthorization: Bearer header, a named header (optionally with a prefix to strip), or a query parameter. It uses the first non-empty value, in order. With no locations set, it only reads Authorization: Bearer. Common causes:
- Callers send the key somewhere the policy doesn’t look.
- A
stripPrefixdoesn’t match what callers send. For example,stripPrefix: "Key "finds nothing inAuthorization: Bearer ....
How to fix
- Compare where your callers send the key with the policy’s key locations.
- Add a second location if you need to accept both styles, and remove or loosen a
stripPrefixthat callers don’t send. - Create a new deployment. The running deployment keeps the policies it started with.
Related errors
err:frontline:client:invalid_key: a key was found but didn’t verify.err:frontline:client:insufficient_permissions: the key verified but lacks the required permissions.