The Wayback Machine - https://web.archive.org/web/20150929005715/https://dev.twitter.com/overview/api/response-codes

Error Codes & Responses

HTTP Status Codes

The Twitter API attempts to return appropriate HTTP status codes for every request.

CodeTextDescription
200OKSuccess!
304Not ModifiedThere was no new data to return.
400Bad RequestThe request was invalid or cannot be otherwise served. An accompanying error message will explain further. In API v1.1, requests without authentication are considered invalid and will yield this response.
401UnauthorizedAuthentication credentials were missing or incorrect.
Also returned in other circumstances, for example all calls to API v1 endpoints now return 401 (use API v1.1 instead).
403ForbiddenThe request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to update limits. Other reasons for this status being returned are listed alongside the response codes in the table below.
404Not FoundThe URI requested is invalid or the resource requested, such as a user, does not exists. Also returned when the requested format is not supported by the requested method.
406Not AcceptableReturned by the Search API when an invalid format is specified in the request.
410GoneThis resource is gone. Used to indicate that an API endpoint has been turned off. For example: “The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1.”
420Enhance Your CalmReturned by the version 1 Search and Trends APIs when you are being rate limited.
422Unprocessable EntityReturned when an image uploaded to POST account / update_profile_banner is unable to be processed.
429Too Many RequestsReturned in API v1.1 when a request cannot be served due to the application’s rate limit having been exhausted for the resource. See Rate Limiting in API v1.1.
500Internal Server ErrorSomething is broken. Please post to the developer forums so the Twitter team can investigate.
502Bad GatewayTwitter is down or being upgraded.
503Service UnavailableThe Twitter servers are up, but overloaded with requests. Try again later.
504Gateway timeoutThe Twitter servers are up, but the request couldn’t be serviced due to some failure within our stack. Try again later.

Error Messages

When the Twitter API returns error messages, it does so in JSON format. For example, an error might look like this:

{"errors":[{"message":"Sorry, that page does not exist","code":34}]}
  

Error Codes

In addition to descriptive error text, error messages contain machine-parseable codes. While the text for an error message may change, the codes will stay the same. The following table describes the codes which may appear when working with the API:

CodeTextDescription
32Could not authenticate youYour call could not be completed as dialed.
34Sorry, that page does not existCorresponds with an HTTP 404 - the specified resource was not found.
64Your account is suspended and is not permitted to access this featureCorresponds with an HTTP 403 — the access token being used belongs to a suspended user and they can’t complete the action you’re trying to take
68The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/rest/publicCorresponds to a HTTP request to a retired v1-era URL.
88Rate limit exceededThe request limit for this resource has been reached for the current rate limit window.
89Invalid or expired tokenThe access token used in the request is incorrect or has expired. Used in API v1.1
92SSL is requiredOnly SSL connections are allowed in the API, you should update your request to a secure connection. See how to connect using SSL
130Over capacityCorresponds with an HTTP 503 - Twitter is temporarily over capacity.
131Internal errorCorresponds with an HTTP 500 - An unknown internal error occurred.
135Could not authenticate youCorresponds with a HTTP 401 - it means that your oauth_timestamp is either ahead or behind our acceptable range
161You are unable to follow more people at this timeCorresponds with HTTP 403 — thrown when a user cannot follow another user due to some kind of limit
179Sorry, you are not authorized to see this statusCorresponds with HTTP 403 — thrown when a Tweet cannot be viewed by the authenticating user, usually due to the tweet’s author having protected their tweets.
185User is over daily status update limitCorresponds with HTTP 403 — thrown when a tweet cannot be posted due to the user having no allowance remaining to post. Despite the text in the error message indicating that this error is only thrown when a daily limit is reached, this error will be thrown whenever a posting limitation has been reached. Posting allowances have roaming windows of time of unspecified duration.
187Status is a duplicateThe status text has been Tweeted already by the authenticated account.
215Bad authentication dataTypically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid.
226This request looks like it might be automated. To protect our users from spam and other malicious activity, we can’t complete this action right now.We constantly monitor and adjust our filters to block spam and malicious activity on the Twitter platform. These systems are tuned in real-time. If you get this response our systems have flagged the Tweet or DM as possibly fitting this profile. If you feel that the Tweet or DM you attempted to create was flagged in error, please report the details around that to us by filing a ticket at https://support.twitter.com/forms/platform.
231User must verify loginReturned as a challenge in xAuth when the user has login verification enabled on their account and needs to be directed to twitter.com to generate a temporary password.
251This endpoint has been retired and should not be used.Corresponds to a HTTP request to a retired URL.
261Application cannot perform write actions.Corresponds with HTTP 403 — thrown when the application is restricted from POST, PUT, or DELETE actions. See How to appeal application suspension and other disciplinary actions.
271You can’t mute yourself.Corresponds with HTTP 403. The authenticated user account cannot mute itself.
272You are not muting the specified user.Corresponds with HTTP 403. The authenticated user account is not muting the account a call is attempting to unmute.
354The text of your direct message is over the max character limit.Corresponds with HTTP 403. The message size exceeds the number of characters permitted in a direct message.

If you see an error response which is not listed in the above table, then fall back to the HTTP status code in order to determine the best way to address the error.