Stable Pro API · v1
401 · unauthorized
The API key is missing or not valid
When
The Authorization: Bearer header is missing, or the key cannot be used. The response carries WWW-Authenticate: Bearer.
Extra fields
reason: Why the key is not valid: one of the reasons below.
Reasons
reason | Meaning |
|---|---|
missing | No key in the Authorization: Bearer header. |
malformed | The key does not have the shape of a Stable Pro key (sp_live_ or sp_test_ followed by 40 letters and digits). |
wrong_environment | A sp_test_ key in production, or a sp_live_ key on staging. |
unknown | No key like this exists. |
connection_revoked | The stable owner revoked the connection: all its keys stopped working. |
revoked | The stable owner revoked this key. |
expired | The key reached its expiry date. |
rotated | A new key replaced this one, and the 7 days in which both worked are over. |
What to do
Ask the stable owner for a valid key (Settings → Connections in Stable Pro).
The response
{
"type": "https://stable-pro.com/docs/api/problems/unauthorized",
"title": "The API key is missing or not valid",
"status": 401,
"detail": "…"
}
Decide on type, never on detail: see Errors.