Error codes
This page documents the error codes returned by ID.me’s OAuth 2.0 endpoints during authorization, logout, and token exchange flows.
These error codes apply to both OAuth 2.0 and OpenID Connect integrations, as OIDC uses the same underlying OAuth 2.0 endpoints
Authorization code and implicit token flow
If the authorization request cannot be completed, ID.me appends error parameters to your redirect_uri when redirecting the user.
All responses are returned with HTTP 200.
Error codes
Logout
If a logout request is malformed or cannot be processed, ID.me returns error parameters on the redirect.
All responses are returned with HTTP 200.
Error codes
Token exchange and refresh
When exchanging an authorization code for an access token, refreshing a token, or using the password grant, errors are returned in the JSON response body.
All responses are returned with HTTP 400 (Bad Request).
All grant types
The following errors apply regardless of grant type:
Authorization code
The invalid_grant error may be returned for several distinct reasons. Use the error_description field in the response to determine the specific cause.
Password grant
Refresh token
Best practice
- Always check for the
errorparameter in redirect URI responses and handle it gracefully - Log error codes and descriptions to assist with debugging and support requests
- Use the
error_descriptionfield to differentiate between multiple causes of the same error code, especiallyinvalid_grant - Map error codes to user-friendly messages rather than exposing raw error strings to end users
- Handle
access_deniedexplicitly, as this indicates the user denied the authorization request and should be routed back to an appropriate page in your application