Skip to the page

Errors

unauthorized

401 Unauthorized. The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.

StatusCodeRetry?
401 UnauthorizedunauthorizedAfter fixing it

What it means

The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API.

Common causes

  • The Authorization header is missing or isn’t Bearer <key>.
  • The key was revoked on the API keys page.
  • The key has a typo; BlueBot checks each key’s checksum before looking it up.

What to do

Send a valid key as Authorization: Bearer <key>.

Can I retry it?

Only after you fix what the message names. Until then the same request gets the same answer.

What the answer looks like

Response401
{
  "error": {
    "code": "unauthorized",
    "message": "That API key isn’t valid. Check it on the API keys page.",
    "hint": "Send a valid key as `Authorization: Bearer <key>`.",
    "doc_url": "https://usebluebot.com/docs/errors/unauthorized",
    "request_id": "req_1Hq2LxW9cVbN3mKpRtYs0a"
  }
}

Branch on code, which never changes. message and hint are written for people and may be reworded. Quote request_id when you write to support.

  • Errors: the envelope and every code
  • Idempotency: retrying without sending twice
  • Limits: every cap and what happens when you reach it