TokenReply

Loading…

Reload

Missing Authorization header

The request reached an authenticated API route without a usable API key header.

Last checked · Sources: TokenReply code and documentation review; upstream wording may vary

Area
Authentication
Typical response
HTTP 401, `Token not provided`
Retry?
No, add credentials first

Symptoms

  • The response says authorization is required or no API key was supplied.
  • The same key works in a client that adds headers automatically.

Likely causes

  • Authorization was omitted, stripped by a proxy, or attached to a different request.
  • The client used a query parameter on a route that expects a Bearer header.

How to diagnose

  • Inspect the outgoing request headers without printing the full secret.
  • Confirm the final hop still contains Authorization: Bearer sk-… .
  • Compare against the minimal curl example in the API key guide.

Fixes

  • Send Authorization: Bearer followed by the TokenReply API key.
  • Allow the Authorization header through reverse proxies and browser CORS configuration.
  • Keep the key in a credential store or environment variable.

How to verify

Repeat a small non-streaming request and confirm the response is no longer an authentication error.

Resources