Errors
Unless otherwise specified, errors from this server are returned either as a
redirect or as an application/json
object in the response body.
Error Redirects
If the server can validate the identity of the client, the server will return
errors by redirecting to the redirect_uri
with details.
HTTP/1.1 302 Found
Location: https://registered-app.com/callback?error=unsupported_response_type&error_description=Response%20type%20test%20not%20supported.&error_uri=https%3A%2F%2Foauth.iracing.com%2Foauth2%2Fbook%2Ferror_unsupported_response_type.html&state=...client_state_data...
-
error
A single ASCII error code, as below.
-
error_description
A textual description of the error, including more detail if possible.
-
error_uri
A link to documentation.
-
state
(optional)The unmodified
state
, if any, from the /authorize call.
Error Responses
If the server cannot identify the client, the server will return errors as an
application/json
object in the response body:
{
"status": 400,
"status_reason": "Bad Request",
"error": "invalid_request",
"error_description": "client_id missing",
"error_uri": "https://oauth.iracing.com/oauth2/book/errors.html"
}
The fields are:
-
status
This reflects the HTTP status code, as below.
-
status_reason
A textual representation of the HTTP status code.
-
error
A single ASCII error code, as below.
-
error_description
A textual description of the error, including more detail if possible.
-
error_uri
A link to documentation.
Error Codes
The error
codes and their corresponding status codes are:
error | status | status_reason | notes |
---|---|---|---|
access_denied | 401 | Unauthorized | |
insufficient_scope | 403 | Forbidden | 2 |
invalid_client | 403 | Unauthorized | |
invalid_grant | 400 | Bad Request | |
invalid_request | 400 | Bad Request | |
invalid_scope | 400 | Bad Request | |
invalid_token | 401 | Unauthorized | 2 |
server_error | 500 | Internal Server Error | 1 |
temporarily_unavailable | 503 | Service Unavailable | 1 |
unauthorized_client | 401 | Unauthorized | |
unsupported_grant_type | 400 | Bad Request | |
unsupported_response_type | 400 | Bad Request |
Notes
- This error may be returned by /token. This is an extension to the OAuth 2.0 Specification as described in the errata.
- This error will not be returned by either /authorize or /token. This is an extension to the OAuth 2.0 Specification for use with other endpoints.