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.
Overview
#Add a Log in with Indeed button so users can log in to your website with their Indeed account.
Steps
#1. Choose a Log in with Indeed button
#Use these images for each state of your button. Pick the column that matches your page background.
| State | Light background | Dark background |
|---|---|---|
| Default | ||
| Hover | ||
| Pressed | ||
| Focused | ||
| Disabled |
2. Authorize your app and authenticate the user
#When the user clicks the button, they approve your app, and you get an access token for them.
-
Link the button to the
https://secure.indeed.com/oauth/v2/authorizeendpoint. 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"><img src="indeed-button.png" alt="Log in with Indeed"/></a> -
When the user clicks Log in with Indeed, Indeed shows the OAuth consent screen. If the user selects Allow, Indeed redirects them to your
redirect_uriwithcode,iss, andstateparameters added. -
Read the
codevalue from the request to yourredirect_uri. For example:GET http://www.acerecruitersllc.com/oauth/indeed?code=rXZSMNyYQHQ&state=employer1234&iss=https%3A%2F%2Fsecure.indeed.com -
Exchange the code for an access token.
-
Use the access token to call Indeed APIs for the user.
3. Get the ID of the logged-in user
#After the user approves your app, get their Indeed account ID.
-
Send the access token to the
v2/api/userinfoendpoint. For example:GET /v2/api/userinfo HTTP/1.1Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cHost: secure.indeed.comThe response includes the user's account ID in
sub. Because the app requested theemailscope, it also includes the email address:HTTP/1.1 200 OKContent-Type: application/json{"sub": "248289761001","email": "mina.ray@myemail.world","email_verified": true} -
Use the
subvalue to identify the user in your system.
See also
#Guides
#- Get a 3-legged access token — Explains how to exchange an authorization code for an access token.
- The userinfo endpoint — Explains how to get the user's account ID and email address.
- Prevent the authorization code from leaking — Explains how to keep the authorization code away from third parties.
References
#- oauth/v2/authorize endpoint — Lists the request parameters for the authorization request.
- Response fields for oauth/v2/authorize — Lists the parameters Indeed adds to your
redirect_uri. - Response fields for v2/api/userinfo — Lists the user information fields that the endpoint returns.
- Glossary — Defines terms such as OAuth consent screen.