Log in with Indeed
Use Indeed-provided images to create Log In with Indeed buttons.
By using this API and its documentation and building an integration, you agree to the Additional API Terms and Guidelines.
Enable users to log in with Indeed credentials
To enable users to log in to your website with their Indeed credentials, complete these steps:
# | Step |
---|---|
1. | |
2. | |
3. |
Construct a Log in with Indeed button
Use one of these button images to construct a Log in with Indeed button:
Name | Light background | Dark background |
---|---|---|
Default | ||
Hover | ||
Pressed | ||
Focused | ||
Disabled |
Authorize your app and authenticate the user
Have the user authorize your app, then get an access token that authenticates the user.
-
Link the Log In with Indeed button to the Indeed
https://secure.indeed.com/oauth/v2/authorize
endpoint.For 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> -
When the user clicks Log In with Indeed, Indeed shows the OAuth consent screen to them. If they select Allow, Indeed passes an authorization code to the
redirect_uri
with thecode
andstate
response fields appended. See Response fields for oauth/v2/authorize. -
Capture the
code
parameter from theredirect_uri
page. For example:GET http://www.acerecruitersllc.com/oauth/indeed?code=rXZSMNyYQHQ&state=employer1234 -
Exchange the authorization code for an access token. See Get 3-legged access token.
-
Use this access token to make API calls on behalf of the user.
Get the ID of the logged-in user
After the user authorizes your app, get the unique job seeker ID.
-
Pass the access token to the
v2/api/userinfo
endpoint.For details, see The userinfo endpoint.
This example request queries the user's account key and email address:
GET /v2/api/userinfo HTTP/1.1Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cHost: secure.indeed.comThe response shows the user's account key and email address:
HTTP/1.1 200 OKContent-Type: application/json{"sub": "248289761001","email": "mina.ray@myemail.world","email_verified": true} -
Use this information to identify the logged-in user.