- HTTP request headers
- Basic authentication scheme
- Scopes
- OAuth consent screen
- Incremental authorization
- Granted scopes
- oauth/v2/authorize endpoint
- Query parameters for oauth/v2/authorize
- Response fields for oauth/v2/authorize
- oauth/v2/tokens endpoint
- Request body parameters for oauth/v2/tokens
- Response fields for oauth/v2/tokens
- v2/api/appinfo endpoint
- Parameters for v2/api/appinfo
- Response fields for v2/api/appinfo
- v2/api/userinfo endpoint
- Parameters for v2/api/userinfo
- Response fields for v2/api/userinfo
- Error response
OAuth reference
HTTP request headers, scopes, and API endpoints with request parameters and response fields.
By using this API and its documentation and building an integration, you agree to the Additional API Terms and Guidelines.
HTTP request headers
The request headers are:
| Header | Value and description |
|---|---|
Accept |
|
Authorization |
In each API call, pass the access token in this header with the
See also access token and basic authentication scheme. |
Content-Type |
|
Basic authentication scheme
When you get an access token, you can use the basic authentication scheme instead of passing your client ID and secret in the /oauth/v2/tokens request body. To use this scheme, you encode and pass these credentials in an Authorization Basic header.
See also Basic Authentication Scheme in RFC 2617: HTTP Authentication: Basic and Digest Access Authentication.
To generate the Authorization Basic header value:
-
Concatenate the
client_idandclient_secretwith a colon (:) as a separator.base64.encode("<client_id>:<client_secret>"); -
Apply the Base64-encoding algorithm to the string:
base64.encode("5e175cbb7f88e2048bd95323bbc9ca2fcec32ad60f95f7ee66ab53e099abe6f3:pJ4qRe2sdXRP0Whr3bwz9D37exFuuOtqJDRHMmmlLWV7J25rH7oItrPNCKzhaQf2"); -
Pass the Base64-encoded string as a basic HTTP
Authorizationheader:Authorization: Basic NWUxNzVjYmI3Zjg4ZTIwNDhiZDk1MzIzYmJjOWNhMmZjZWMzMmFkNjBmOTVmN2VlNjZhYjUzZTA5OWFiZTZmMzpwSjRxUmUyc2RYUlAwV2hyM2J3ejlEMzdleEZ1dU90cUpEUkhNbW1sTFdWN0oyNXJIN29JdHJQTkNLemhhUWYy
Scopes
Scopes authorize your app to act on behalf of itself, other user accounts, or their associated employer accounts.
Some Indeed APIs require additional scopes when you request an access token. For API-specific scopes, see each API's documentation.
To grant your app permissions, include the scope parameter when you get an access token.
OAuth consent screen
For the Authorization code grant type (3-legged OAuth), Indeed shows the OAuth consent screen when your app calls https://secure.indeed.com/oauth/v2/authorize.
When the user selects Allow for the scopes your app requests (such as employer_access), Indeed sends an authorization code to the redirect_uri with the code and state response fields appended.
Once a user grants a scope, your app keeps it. For example, if your app later needs the employer_access scope, the OAuth consent screen prompts the user only for employer_access — not for email or offline_access.
The authorizing user grants scopes to your app and can revoke them at any time on the Indeed Third-party applications with account access page. The user can grant the scopes again the next time they use the app.
Incremental authorization
Incremental authorization lets OAuth apps request only the scopes they need. It requires the offline_access scope, which preserves the permissions your app already holds. For example, if your app requests the email scope, it must also request offline_access.
Granted scopes
The consented_scope field in the oauth/v2/tokens response lists the app's granted scopes:
{ "access_token": "<access_token>", "refresh_token": "<refresh_token>", "id_token": "<id_token>", "scope": "offline_access employer_access email", "consented_scope": "offline_access employer_access email", "convid": "1er835qvtu54n800", "token_type": "Bearer", "expires_in": 3600}Additionally, for the Authorization code grant type (3-legged OAuth), the Current permissions tab on the OAuth consent screen lists the app's scopes.
| Scope | Permissions |
|---|---|
email | Consent screen: View your email address Lets your app read the user's ✔ 3-legged OAuth |
employer_access | Consent screen: List employers associated with a user account and get an access token for an employer Lists every employer account associated with the user. Required to get an access token for an employer. To list employers and get an access token for an employer:
✔ 3-legged OAuth ✔ 2-legged OAuth |
offline_access | Consent screen: Maintain the permissions that you have granted Required to generate a refresh token. Indeed OAuth access tokens expire after one hour, so use a refresh token to get a new one. ✔ 3-legged OAuth |
oauth/v2/authorize endpoint
To get an authorization code for the Authorization code grant type (3-legged OAuth), call the https://secure.indeed.com/oauth/v2/authorize endpoint with the query parameters.
Indeed shows the OAuth consent screen to the end user who owns the target account.
When the end user selects Allow, Indeed sends an authorization code to the redirect_uri with the code and state response fields appended.
For an example call, see Get an authorization code.
Query parameters for oauth/v2/authorize
This endpoint and these query parameters apply to 3-legged OAuth only:
| Query parameter | Description |
|---|---|
client_id | Required. The client ID. Examples:
|
code_challenge | Required for public clients, recommended for confidential clients. The OAuth PKCE code challenge derived from a code verifier per RFC 7636: Proof Key for Code Exchange by OAuth Public Clients. Example:
|
code_challenge_method | Required when you use PKCE with Only Example:
|
employer | Optional. The employer ID to associate with the access token. You can also pass this parameter when you exchange a refresh token for an access token. Example:
|
prompt | Required. Shows the authorizing user an Indeed employer selection screen, where they pick the employer account to assign to your access token. Add Example:
|
redirect_uri | Required. The URL-encoded redirect URL. Identifies the page on your site that captures the authorization code. It must match one of the redirect URLs your app registered. Example: Encode
Although Indeed supports query parameters in the See also the |
response_type | Required. Always Example:
|
scope | Optional. The permissions your app requests. URL-encode and space-delimit the scopes; encoding turns spaces into plus signs ( Example:
See Scopes. |
state | Recommended. Prevents CSRF attacks. Use any unique string your app creates to maintain state between the request and callback. Indeed forwards this value to your redirect URI. Example:
See Threat: CSRF Attack against redirect-uri in RFC 6819: OAuth 2.0 Threat Model and Security Considerations. |
Response fields for oauth/v2/authorize
oauth/v2/tokens endpoint
To exchange your client ID and secret for an access token, send a POST to https://apis.indeed.com/oauth/v2/tokens with the Accept and Content-Type request headers and the request body parameters.
For example calls, see:
Include these request body parameters:
Request body parameters for oauth/v2/tokens
| Request body parameter | Description |
|---|---|
client_id | Your client ID. Example:
Instead of sending ✔ 3-legged OAuth ✔ 2-legged OAuth |
client_secret | Your client secret. Omit for public clients. Example:
Instead of sending ✔ 3-legged OAuth ✔ 2-legged OAuth |
code | The authorization code to exchange for an access token. To exchange a refresh token instead, use Example:
✔ 3-legged OAuth |
code_verifier | The code verifier that produced Example:
✔ 3-legged OAuth, required when you use PKCE |
employer | The employer ID to associate with the access token. Example:
✔ 2-legged OAuth ✔ 3-legged OAuth |
grant_type | Use one of these grant types:
Example:
✔ 3-legged OAuth ✔ 2-legged OAuth ✔ Token exchange OAuth |
redirect_uri | The URL-encoded redirect URL. It must match the redirect URL you used when you got the authorization code. Example: Encode
See Get an authorization code. ✔ 3-legged OAuth |
refresh_token | The refresh token to exchange for an access token. Indeed returns the refresh token when you get an access token. To exchange an authorization code instead, use Example:
✔ 3-legged OAuth |
scope | Conditional. To list the employer accounts associated with the user who registered the app, or to get an access token for one of those accounts, set For the Token exchange grant type (OAuth), set See Scopes. Example:
✔ 3-legged OAuth ✔ 2-legged OAuth |
sub | The user's ID in the identity provider. Must map to Example:
✔ Token exchange OAuth |
subject_token | The token that represents the identity of the party the request is made on behalf of. The token issuer must give Indeed a way to validate it. Indeed supports only ID tokens. Example:
✔ Token exchange OAuth |
subject_token_type | The token type passed in Example:
✔ Token exchange OAuth |
Response fields for oauth/v2/tokens
| Response field | Type | Description |
|---|---|---|
access_token | String | Your access token. Example:
|
consented_scope | String | A space-delimited list of every scope the user has granted your app. Indeed returns this field only when the user grants the Can include scopes outside the current access token. The Example:
|
convid | String | The conversation identifier. Example:
|
error | String | The error type. Example:
|
error_description | String | A description of the error. Example:
|
expires_in | Integer | How long the token stays valid, in seconds. Tokens last one hour (3600 seconds). Example:
|
id_token | String | Your ID token. Example:
See ID Token. |
issued_token_type | String | The type of the issued token. Example:
|
refresh_token | String | Indeed returns a refresh token only when you request the Example:
|
scope | String | The space-delimited permissions actually granted to your app, such as Example:
See Scopes. |
token_type | String | Always Example:
|
v2/api/appinfo endpoint
To list the employers associated with the user account that registered the app, call https://secure.indeed.com/v2/api/appinfo with the access token in the Authorization header using the Bearer authentication scheme.
For an example call, see Build employer selection screen.
Parameters for v2/api/appinfo
This endpoint takes no request body or query parameters.
Response fields for v2/api/appinfo
v2/api/userinfo endpoint
To get account information for the current user, send a GET to https://secure.indeed.com/v2/api/userinfo. The response matches the information in the ID token.
For an example call, see The userinfo endpoint.
Parameters for v2/api/userinfo
This endpoint takes no request body or query parameters.
Response fields for v2/api/userinfo
Error response
See Troubleshoot OAuth errors.