Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

errorstatusstatus_reasonnotes
access_denied401Unauthorized
insufficient_scope403Forbidden2
invalid_client403Unauthorized
invalid_grant400Bad Request
invalid_request400Bad Request
invalid_scope400Bad Request
invalid_token401Unauthorized2
server_error500Internal Server Error1
temporarily_unavailable503Service Unavailable1
unauthorized_client401Unauthorized
unsupported_grant_type400Bad Request
unsupported_response_type400Bad Request

Notes

  1. This error may be returned by /token. This is an extension to the OAuth 2.0 Specification as described in the errata.
  2. 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.