missing_credentials means the request reached a protected route without a usable Authorization: Bearer header. Read this page if your first call fails with a 401, or if a proxy or HTTP client drops headers.
What happened
Routes: every protected route under/v1/, including runs, keys, usage, quota and billing.
The credential is the first thing OpenType checks, so this error comes before any body or scope check. One of these is true:
The scheme name is not case-sensitive:
bearer works too. There is no other authentication header and no cookie authentication. The response does not carry a WWW-Authenticate header.
How to fix
- Send
Authorization: Bearer <credential>on every call. For your code, the credential is an API key:otsk_followed by 64 lowercase hex characters. - Check that
OPENTYPE_API_KEYis set in the process that makes the call. An unset variable produces an empty token. - If you call through a proxy, gateway or serverless platform, check that it forwards the
Authorizationheader. - Keep the key on your server. Do not send it from a browser or a mobile app.
Example
Related
- Authentication - how OpenType reads the bearer credential.
- invalid_credential - a credential was sent but rejected.
- API keys in the console - create a key and copy its secret.
- Problem codes - every code, its status, and whether a retry can help.