Troubleshoot OAuth errors
Troubleshoot OAuth errors that can occur before you access GraphQL.
Overview
Learn how to troubleshoot OAuth errors that can occur before you access GraphQL.
To troubleshoot GraphQL errors, see Troubleshoot GraphQL errors. If you are new to GraphQL, see Apollo Odyssey: GraphQL Tutorials.
Troubleshoot OAuth errors
The authorization endpoints are:
https://secure.indeed.com/oauth/v2/authorizehttps://apis.indeed.com/oauth/v2/tokenshttps://secure.indeed.com/v2/api/appinfohttps://secure.indeed.com/v2/api/userinfo
To return errors, authorization endpoints follow the Error Response guidelines in RFC 6749: The OAuth 2.0 Authorization Framework.
For example:
{ "error_description": "Invalid grant", "error": "invalid_grant"}The error values are:
error value | Description | See |
|---|---|---|
| Client ID, client secret, authorization code, or refresh token is incorrect. The | |
invalid_request | Request parameter has an issue. The | |
unsupported_grant_type | Grant type is not supported. The requested
|
invalid_grant errors – Causes and resolutions
To resolve an invalid_grant error, review the following causes and resolutions:
| Error | Cause | Resolution |
|---|---|---|
| Incorrect client ID or secret | ||
You copy a credential incorrectly from the Manage app credentials page. | Verify your client ID and secret. | |
| Incorrect client secret | ||
You add a secret and delete the original secret for your client ID but do not update all your credential stores. | Verify that your credential stores contain the latest client secret. | |
| Disabled client credentials grant type | ||
You use the Client credentials grant type (2-legged OAuth) and the client credentials grant type is not enabled. | On the Manage app credentials page, select Client credentials in Allowed grant types. | |
| Disabled authorization code grant type | ||
You use the Authorization code grant type (3-legged OAuth), but the authorization code grant type is not enabled. | On the Manage app credentials page, select Authorization code in Allowed grant types. | |
| Mismatched redirect_uri parameter values | ||
You use the Authorization code grant type (3-legged OAuth) and these values do not match:
| Ensure that the two | |
| Expired or already-used authorization code | ||
You use the Authorization code grant type (3-legged OAuth) and you used an expired or already-used authorization code. You can use an authorization code only one time. | To renew access tokens without reauthorization, request the | |
| Refresh token is not valid | ||
You use the Authorization code grant type (3-legged OAuth) and the refresh token is not valid. Refresh tokens expire 60 days after last usage or after issue if never used. This issue can occur for one of these reasons:
| Ask the user to request another refresh token through the Authorization code grant type (3-legged OAuth). | |
| The authorization code or refresh token is not valid for your app | ||
You use the Authorization code grant type (3-legged OAuth) and the authorization code or refresh token is valid but it was issued to a different app. | Use the same client ID and secret through all stages of the authorization process. | |
invalid_request errors – Causes and resolutions
To resolve an invalid_request error, review the following causes and resolutions:
| Error | Cause | Resolution |
|---|---|---|
| Incorrect or missing parameter | ||
Required parameter is missing or its value is not valid. | Include or correct the parameter. | |
| Misplaced query string parameters | ||
Query string parameters in the request URL in | Include query string parameters in the HTTP request body, by using the | |
| Incorrect employer parameter value | ||
The issue can occur for one of these reasons:
| To list valid
Then, update the value of the | |