Sign in to run requests with your own sandbox key. Sign in
401 Unauthorized

unauthorized — Unauthorized

Message “A valid bearer token is required.”

What causes it

  • No `Authorization: Bearer <token>` header was sent (the response carries `WWW-Authenticate: Bearer realm="api"`).
  • The token is unknown, expired (default lifetime is 90 days), revoked, or belongs to a deactivated API client (`WWW-Authenticate: Bearer error="invalid_token"`).
  • The header used a different scheme (`Basic`, `Token`) or the token was sent as a query parameter.

How to fix it

  1. Send the key exactly as `Authorization: Bearer <key>`; the scheme is case-insensitive, the key is not.
  2. Mint a fresh key from the API & MCP page if yours has expired or was revoked, and rotate it in your secrets store.
  3. Never retry a 401 in a loop — repeated unknown-token attempts from one IP earn a temporary `rate_limited` ban.

Operations that return it

Any operation can return this code.

See the API reference for the full list of operations.

Example response

HTTP/1.1 401 Unauthorized · Content-Type: application/json

401 Unauthorized
{
  "error": {
    "code": "unauthorized",
    "message": "A valid bearer token is required.",
    "details": [],
    "request_id": "6f1c2a3e-8d4b-4c5e-9f0a-1b2c3d4e5f60",
    "doc_url": "https://cascades.crscreditapi.com/docs/api/errors/unauthorized"
  }
}