Error Handling
Comprehensive guide to error codes, status codes, and error handling strategies.
Common Error Responses
400 Bad Request
The request contains invalid parameters or is malformed.
{"error": "invalid_request", "error_description": "Missing required parameter"}
401 Unauthorized
The token is invalid or expired, or authentication is missing.
{"error": "invalid_token", "error_description": "Token expired or invalid"}
403 Forbidden
Access denied. The user may have revoked access or the account is banned/suspended.
{"error": "access_denied", "error_description": "Account banned"}
429 Too Many Requests
You exceeded the rate limit. Wait before retrying.
{"error": "rate_limit_exceeded", "error_description": "Too many requests"}
Token Endpoint Errors
The API returns errors as JSON in the response body:
{
"error": "invalid_grant",
"error_description": "Authorization code expired"
}
Common Error Codes
| Error Code | Type | Description |
|---|---|---|
| invalid_request | string | Request is missing a required parameter |
| invalid_client | string | Client authentication failed |
| invalid_grant | string | Authorization code is invalid or expired |
| unauthorized_client | string | Client is not authorized to use this grant type |
| unsupported_grant_type | string | Grant type is not supported |
