KEY_SCOPE_DENIED
The key lacks the scope this endpoint needs
The secret key was created with a limited set of scopes (email, ip, phone, address, entity, consistency, account), and the endpoint belongs to a family it does not cover.
- http status
- 403
- credits
- Nothing is billed for a failed request.
What it means
Scopes let a key for one integration reach only the product it needs: a signup form's key can verify email without being able to spend on IP or phone lookups. A key created without choosing scopes has every scope.
Nothing is billed for a refused request.
What to do
Create a key with the scope the integration needs and use that one. Scopes are set at creation; Rotate issues a replacement carrying the same scopes, so a change of scope is a new key rather than a rotation.
Example response
{
"success": false,
"error": {
"code": "KEY_SCOPE_DENIED",
"message": "This API key is not allowed to call ip endpoints. Create a key with the ip scope.",
"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_ACCOUNT_MISMATCH · the key belongs to an account its holder has left
- 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_SCOPE_DENIED.md