Code | Text | Description | Troubleshooting tips |
---|---|---|---|
200 | OK | The request was successful! | |
400 | Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message will explain further. Requests without authentication or with invalid query parameters are considered invalid and will yield this response. | Double check the format of your JSON query. For example, if your rule contains double-quote characters associated with an exact-match or other operator, you may need to escape them using a backslash to distinguish them from the structure of the JSON format. |
401 | Unauthorized | There was a problem authenticating your request. This could be due to missing or incorrect authentication credentials. This may also be returned in other undefined circumstances. | Check that you are using the correct authentication method and that your credentials are correct. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. | Check that your developer account includes access to the endpoint you’re trying to use. You may also need to get your App allowlisted (e.g. Engagement API or Ads API) or sign up for access. |
404 | Not Found | The URI requested is invalid or the resource requested, such as a user, does not exist. | Check that you are using valid parameters and the correct URI for the endpoint you’re using. |
409 | Connection Exception | Returned when attempting to connect to a filtered stream that has no rules. | Check that you have created at least one rule on the stream you are connecting to. Filtered stream will only return Posts that match an active rule. If there are no rules, the stream will not return any Posts. |
429 | Too Many Requests | Returned when a request cannot be served due to the App’s rate limit or Post cap having been exhausted. See Rate Limiting. | Check the number of requests per timeframe allowed with the endpoint you’re using. Wait for the timeframe to reset. Space out your requests to ensure you don’t hit rate limits or upgrade to the next available data plan. |
500 | Internal Server Error | Something is broken. This is usually a temporary error, for example in a high load situation or if an endpoint is temporarily having issues. | Check the X API status page or the developer community forum in case others are having similar issues, or simply wait and try again later. |
501 | Unimplemented | The X API does not support this endpoint and cannot fulfill the request. | |
503 | Service Unavailable | The X servers are up, but overloaded with requests. Try again later. | Check the X API status page or the developer community forum in case others are having similar issues, or simply wait and try again later. |
Title | Type | Description |
---|---|---|
Generic Problem | about:blank | A generic problem with no additional information beyond that provided by the HTTP status code. |
Invalid Request Problem | https://api.X.com/2/problems/invalid-request | A problem that indicates this request is invalid. If your request takes a POST body, ensure the contents is valid JSON and matches the OpenAPI spec. |
Resource Not Found Problem | https://api.X.com/2/problems/resource-not-found | A problem that indicates that a given Post, User, etc. does not exist. |
Resource Unauthorized Problem | https://api.X.com/2/problems/not-authorized-for-resource | A problem that indicates you are not allowed to see a particular Post, User, etc. |
Client Forbidden Problem | https://api.X.com/2/problems/client-forbidden | A problem that indicates your client is forbidden from making this request. |
Disallowed Resource Problem | https://api.X.com/2/problems/disallowed-resource | A problem that indicates that the resource requested violates the precepts of this API. |
Unsupported Authentication Problem | https://api.X.com/2/problems/unsupported-authentication | A problem that indicates that the authentication used is not supported. |
Usage Capped Problem | https://api.X.com/2/problems/usage-capped | A problem that indicates that a usage cap has been exceeded. |
Connection Exception Problem | https://api.X.com/2/problems/streaming-connection | A problem that indicates something is wrong with the connection. |
Client Disconnected Problem | https://api.X.com/2/problems/client-disconnected | Your client has gone away. |
Operational Disconnect Problem | https://api.X.com/2/problems/operational-disconnect | You have been disconnected for operational reasons. |
Rule Cap Problem | https://api.X.com/2/problems/rule-cap | You have exceeded the maximum number of rules. |
Rule Length Problem | https://api.X.com/2/problems/rule-length | You have exceeded the maximum number of characters allowed on your query or rule based on your access level. See access levels. |
Invalid Rules Problem | https://api.X.com/2/problems/invalid-rules | The rule you have submitted is invalid. |
Duplicate Rules Problem | https://api.X.com/2/problems/duplicate-rules | The rule you have submitted is a duplicate. |
Debugging your code
Authentication issues
oauth_nonce
, oauth_signature
, and oauth_timestamp
for your request.Rate limiting and Post cap issues
Missing Post issues
Full buffer disconnect issues