unauthorized: Invalid API key
Havoptic API error unauthorized (HTTP 401, Invalid API key): You sent an API key that is unknown or revoked. What it means and how to fix it.
| Field | Value |
|---|---|
| type | https://www.havoptic.com/docs/errors/unauthorized |
| HTTP status | 401 |
| title | Invalid API key |
| Returned by | api.havoptic.com |
What it means
A request that carries a key is checked against it. A bad key is rejected with 401; it is never silently downgraded to the anonymous tier, so a typo cannot hide behind lower limits.
Common causes
- The key was revoked on the API keys dashboard.
- A truncated or mistyped key. Keys are
hv_live_followed by 32 letters and digits. - An
Authorizationheader that is not exactlyBearer <key>.
How to fix it
- Create a new key at /api-keys and send it as
Authorization: Bearer hv_live_…(orX-Api-Key). - Or omit the key entirely to use the anonymous tier (60 requests per minute per IP).
Example response
{
"type": "https://www.havoptic.com/docs/errors/unauthorized",
"title": "Invalid API key",
"status": 401,
"detail": "The API key is unknown or revoked. Omit it to use the anonymous tier, or create one at https://www.havoptic.com/api-keys."
}