As much as possible, Foursquare attempts to use appropriate HTTP status codes to indicate the general class of problem, and this status code is repeated in the code section of the meta response.

Response Code Description
Bad Request 400 Any case where a parameter is invalid, or a required parameter is missing. This includes the case where no OAuth token is provided and the case where a resource ID is specified incorrectly in a path.
Unauthorized 401 The OAuth token was provided but was invalid.
Forbidden 403 The requested information cannot be viewed by the acting user, for example, because they are not friends with the user whose data they are trying to read. It could also indicate privileges or access has been revoked.
Not Found 404 Endpoint does not exist.
Method Not Allowed 405 Attempting to use POST with a GET-only endpoint, or vice-versa.
Conflict 409 The request could not be completed as it is. Use the information included in the response to modify the request and retry.
Internal Server Error 500 Foursquare’s servers are unhappy. There is either a bug on our side or there is an outage. The request is probably valid but needs to be retried later.

Additional details are provided in the errorType field of the response. It should be one of the following.

errorType Status Code Explanation
invalid_auth 401 OAuth token was not provided or was invalid.
param_error 400 A required parameter was missing or a parameter was malformed. This is also used if the resource ID in the path is incorrect.
endpoint_error 404 The requested path does not exist.
not_authorized 403 Although authentication succeeded, the acting user is not allowed to see this information due to privacy restrictions.
rate_limit_exceeded 403 Rate limit for this hour exceeded.
quota_exceeded 429 Daily call quota exceeded.
deprecated 200 Something about this request is using deprecated functionality, or the response format may be about to change.
server_error Varies Server is currently experiencing issues.

Errors will usually include an errorDetail field with additional information about what went wrong, intended for the developer. In some cases, the server may include an errorMessage, which is a localized string intended for the client to display back to the user directly.