Skip to content

invalid_api_key

invalid_api_key: HTTP 401, authentication error. The API key is not valid.


Code invalid_api_key
Type authentication_error
HTTP status 401
Default message The API key is not valid.

The Authorization header is missing or is not Bearer <key>, the key is malformed, unknown or revoked. A key looks like bk_test_… (sandbox) or bk_live_… (live). See Authentication.

We could not tell who is calling. Check the credentials you send.

Every error has the same shape; error.code is this code, and meta.request_id is what to quote when you ask us about a request.

{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"detail": "The API key is not valid.",
"documentation_url": "https://docs.baiyar.com/resources/errors/invalid_api_key/"
},
"meta": { "request_id": "req_…" }
}

All error codes