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

StatuscodeMeaning
401missing_api_keyNo key was sent
401invalid_api_keyNo such key; check for a typo
401key_revokedThe key existed and was revoked; talk to whoever issued it
402plan_limitA plan cap is reached. details.resource is targets or keywords, with limit and current
403scope_requiredThe key lacks a scope; details.scope names it
404not_subscribedYou do not monitor that account; a failed resolution adds details.state: "failed", details.reason and details.failed_at
404user_not_foundX has no such account: never registered, deleted or deactivated
404user_suspendedX has suspended this account
404user_protectedThe account's posts are protected (approved followers only), so it cannot be monitored
404tweet_not_foundNo such post, or it has been deleted
404not_foundNo such resource
409idempotency_key_reuseThe same Idempotency-Key was already used with a different request
409conflictThe resource is in a state that forbids the change; details.reason says why
422invalid_requestThe body or query failed validation. As 422, details.fields names each offending field; as 400, a value we could parse but not accept
429rate_limitedYour per-minute request budget is spent; Retry-After says when
429quota_exhaustedThe upstream limit for that read was reached; Retry-After says when
502upstreamX did not answer as expected. Usually transient; retry
500internalOur fault. Send us the request_id