Stable Pro

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

reasonMeaning
missingNo key in the Authorization: Bearer header.
malformedThe key does not have the shape of a Stable Pro key (sp_live_ or sp_test_ followed by 40 letters and digits).
wrong_environmentA sp_test_ key in production, or a sp_live_ key on staging.
unknownNo key like this exists.
connection_revokedThe stable owner revoked the connection: all its keys stopped working.
revokedThe stable owner revoked this key.
expiredThe key reached its expiry date.
rotatedA 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.