invalid_token
HTTP 401 — Invalid access token
What it means
The Bearer credential was recognized as an OAuth access token, but it is expired, revoked, or malformed.
Common causes
- The access token expired and the client did not refresh it.
- The grant was revoked under Settings → Connected AI apps.
How to fix it
Refresh the token through the OAuth flow that issued it, or re-authorize the application.
Should you retry?
Only after obtaining a fresh token.
The response shape
Every /v1 error is an RFC 9457 application/problem+json document: type links to this page, code is the stable value to branch on (never parse title or detail), and request_id identifies the request to support. Validation failures add an errors array of per-field JSON pointers.
API overview · API reference · All error codes:
missing_credentials— HTTP 401, Missing credentialsinvalid_api_key— HTTP 401, Invalid API keyunsupported_credential_type— HTTP 403, Credential type not usable on this surfaceinsufficient_scope— HTTP 403, Insufficient scopefeature_not_enabled— HTTP 403, Feature not enabled on this planvalidation_failed— HTTP 400, Request validation failedresource_not_found— HTTP 404, Resource not foundrate_limited— HTTP 429, Rate limit exceededquota_exhausted— HTTP 429, Plan quota exhaustedidempotency_key_reused— HTTP 422, Idempotency-Key reused with a different requestidempotency_in_progress— HTTP 409, A request with this Idempotency-Key is still in progressinternal_error— HTTP 500, Internal server error