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.
| Status | Code | Retry? |
|---|---|---|
| 401 Unauthorized | unauthorized | After 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
Authorizationheader is missing or isn’tBearer <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.
Related
- : the envelope and every code
- : retrying without sending twice
- : every cap and what happens when you reach it