Skip to main content
Errors encountered during the OAuth process conform to the OAuth 2.0 error spec. As a result, they have a slightly different format than the error objects used in other parts of Smile’s API. OAuth errors will always contain an error key. They will also contain a state key if any state was provided by the client during the request.
JSON
{
  "error": "invalid_grant",
  "state": "2f64f89bf4075bb"
}

Errors during the authorization flow

If an error is encountered during the authorization phase of the OAuth flow, the user agent will be sent to the appropriate redirect URI with an error query parameter (as well as a state query parameter if state was provided). The value of the error query parameter will be one of the available error codes.

Errors during token exchange

If an error is encountered during the token exchange phase, it will be presented as an object in the request response, as seen below. The value of the error key will be one of the available error codes.