KEY_ACCOUNT_MISMATCH
The key belongs to an account its holder has left
A secret key belongs to the account it was created on. The person who holds this one is no longer a member of that account, so the key no longer authorises anything.
- http status
- 403
- credits
- Nothing is billed for a failed request.
What it means
This is what a shared account is for: keys are the account's, not one person's, so somebody leaving a team does not take working credentials with them and does not require every other key to be rotated.
Nothing is billed for a refused request.
What to do
Ask an owner or an admin on the account to create a new key. Any owner or admin can create, rotate and revoke any key the account holds.
Example response
{
"success": false,
"error": {
"code": "KEY_ACCOUNT_MISMATCH",
"message": "This API key belongs to an account you are no longer a member of. Ask an owner or admin for a new key.",
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}Every error carries the request_id also sent in the X-Request-Id header; quote it when writing to support.
Related
- ORIGIN_NOT_ALLOWED · the page's origin is not on the key's allowed list
- KEY_IP_NOT_ALLOWED · the key is used from an address outside its allowlist
- KEY_SCOPE_DENIED · the key lacks the scope this endpoint needs
- SANDBOX_ENDPOINT_NOT_ALLOWED · the sandbox key does not answer this endpoint
- SANDBOX_VALUE_NOT_ALLOWED · the sandbox key does not answer for that value
- TURNSTILE_FAILED · the publishable key requires a Cloudflare Turnstile token
- EMAIL_NOT_VERIFIED · the account behind the key has not confirmed its email address
- All error codes
- Verdicts and the risk score
- API reference
markdown version: /docs/errors/KEY_ACCOUNT_MISMATCH.md