Errors
The error object
Every failure has the same shape, whatever caused it:
403
{
"error": {
"code": "scope_required",
"message": "This key is not allowed to perform that action.",
"details": {
"scope": "keywords:write"
}
},
"request_id": "req_d3428e686099bb0e"
}code
| Status | code | Meaning |
|---|---|---|
| 401 | missing_api_key | No key was sent |
| 401 | invalid_api_key | No such key; check for a typo |
| 401 | key_revoked | The key existed and was revoked; talk to whoever issued it |
| 402 | plan_limit | A plan cap is reached. details.resource is targets or keywords, with limit and current |
| 403 | scope_required | The key lacks a scope; details.scope names it |
| 404 | not_subscribed | You do not monitor that account; a failed resolution adds details.state: "failed", details.reason and details.failed_at |
| 404 | user_not_found | X has no such account: never registered, deleted or deactivated |
| 404 | user_suspended | X has suspended this account |
| 404 | user_protected | The account's posts are protected (approved followers only), so it cannot be monitored |
| 404 | tweet_not_found | No such post, or it has been deleted |
| 404 | not_found | No such resource |
| 409 | idempotency_key_reuse | The same Idempotency-Key was already used with a different request |
| 409 | conflict | The resource is in a state that forbids the change; details.reason says why |
| 422 | invalid_request | The body or query failed validation. As 422, details.fields names each offending field; as 400, a value we could parse but not accept |
| 429 | rate_limited | Your per-minute request budget is spent; Retry-After says when |
| 429 | quota_exhausted | The upstream limit for that read was reached; Retry-After says when |
| 502 | upstream | X did not answer as expected. Usually transient; retry |
| 500 | internal | Our fault. Send us the request_id |