message field describing the problem. This page covers every code you may encounter, what causes it, and how to resolve it.
Error response format
All error responses share the same structure:message field is a human-readable description of what went wrong. Check it first when debugging; it often points straight at the problem.
Quick reference
400 Bad Request
The request could not be processed because of invalid or missing parameters. Common causes- A required parameter is missing (for example,
link,id,username, orquery) - A parameter has the wrong type or format (for example, a string where a number is expected)
- The JSON body in a POST request is malformed or empty
Content-Type: application/json and make sure the body is valid JSON.
401 Unauthorized
Authentication failed. The API could not identify your account. Common causes- The
ApiKeyheader is missing entirely - The header name is misspelled. It is case-sensitive: use
ApiKey, notApi-Key,apikey, orapi_key - The key value is wrong, was copied with extra whitespace, or belongs to a deleted key
ApiKey: your_key_here, and check that the key is still active in your Dashboard. When in doubt, copy the key straight from the dashboard. See Authentication for more.
403 Forbidden
Your API key is valid, but the request was rejected. Common causes- Your request quota is exhausted (0 requests remaining)
- Your subscription has expired
GET /key-usage-info or in your Dashboard. If your requests are used up, top up or upgrade on the Billing page.
404 Not Found
The requested resource does not exist. Common causes- The X user changed their username, deleted their account, or was suspended
- The tweet was deleted by its author
- The account or tweet is private (protected). Sorsa can only access public data
- The endpoint URL itself is incorrect
/username-to-id.
429 Too Many Requests
You have exceeded the rate limit of 20 requests per second. Common causes- Sending requests in a tight loop with no delay
- Running multiple parallel workers that share one API key
500 Internal Server Error
Something went wrong on our side. What to do- Retry after a short delay (1 to 2 seconds). Transient 500s often clear on their own.
- If it persists across retries or affects multiple endpoints, check the Status Page for ongoing incidents.
- If the problem continues, contact support at [email protected] or on Discord with the endpoint URL, request body, and approximate timestamp.
Handling errors in code
A resilient integration handles every error code gracefully instead of crashing on an unexpected response. Here is a reusable pattern for Python and JavaScript. Python429 and 500 (transient), but fail fast on 400, 401, 403, and 404 (these need a code or configuration fix).
Next steps
- Rate Limits - Strategies for staying within the 20 req/s limit
- Pagination - Fetch large datasets without errors
- API Reference - Full endpoint list with parameter schemas