Log In with Indeed

Use Indeed-provided images to create Log In with Indeed buttons.


By using this API, this API documentation, and/or building the integration, you agree to the Additional API Terms and Guidelines.


If you don't want to manage your own set of website login credentials, you can allow users to log in to your website with their Indeed credentials.

To do this:

  • Construct the button UI element using one of the following button images.
  • When the user clicks the button, redirect the user to the Indeed OAuth authentication server.
  • After the user authorizes your app, query the user info endpoint to obtain a unique job seeker ID.

Button Images

Use one of the following images to construct your UI element.

Name For Light Backgrounds For Dark Backgrounds
Default
default light button
default light button
default dark button
default dark button
Hover
light hover
light hover
dark hover
dark hover
Pressed
light pressed
light pressed
dark pressed
dark pressed
Focus
light focus
light focus
dark focus
dark focus
Disabled
light disabled
light disabled
dark disabled
dark disabled

 

Redirect the User

Construct a button that redirects the user to the Indeed OAuth authentication server.

Request an Authorization Code

When the user clicks the Log In with Indeed button, link the button to the Indeed authorization end point.

For parameter details, see the the request an authorization code section of the Authorization Code (3-legged OAuth) documentation.

Example

<a href="https://secure.indeed.com/oauth/v2/authorize?client_id=6nwwcdklwgktryjw2j5fxh5t2fyneule7zg7mvw3pf9jbx3wmewzlxkdz1jxvt7c&redirect_uri=http%3A%2F%2Fwww.acerecruitersllc.com%2Fgotcode.html&response_type=code&state=employer1234&scope=email+offline_access+employer_access"><img src="indeed-button.png" alt="default light"/></a>

Receive the Authorization Code

After the user authorizes your app, Indeed returns an authorization code to the redirect URL that you specified in the redirect_uri parameter. Capture this authorization code.

Example

http://www.acerecruitersllc.com/gotcode.html?state=employer1234&code=lXe_sN-A4sU

Request an Access Token

Exchange the authorization code for an access token.

Example Request

curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: application/json' \
 -d 'code=lXe_sN-A4sU' \
 -d 'client_id=6nwwcdklwgktryjw2j5fxh5t2fyneule7zg7mvw3pf9jbx3wmewzlxkdz1jxvs6b' \
 -d 'client_secret=02KKpg6yLXw2v3FKf5lqyFGtMQCvPBNbJIw89SoSd9fts1LAdlvwUQQ6dwhAhEXv' \
 -d 'redirect_uri=http://localhost:3000/oauth/callback' \
 -d 'grant_type=authorization_code' \
 https://apis.indeed.com/oauth/v2/tokens

Example Response

{
   "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV[...]",
   "id_token":"eyJraWQiOiJlMzEzZTc4My1lM2YwLTQ3ZWMtY[...]",
   "refresh_token":"rXZSMNyYQHQ",
   "expires_in":3600,
   "token_type":"Bearer",
   "scope": "email offline_access",
   "consented_scope": "email offline_access"
}

Use this access token to make API calls on behalf of the user.

Get the User's ID

After you have an access token, pass it to the user information resource. A successful request returns the user's account key and email address. With this information, you can identify the logged-in user.

The following is an example request and response to the user information resource.

Example Request

GET /v2/api/userinfo HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Host: secure.indeed.com

Example Response

  HTTP/1.1 200 OK
  Content-Type: application/json

  {
   "sub": "248289761001",
   "email": "mina.ray@myemail.world",
   "email_verified": true
  }