For customers using the SHIFT API, follow these steps to perform authentication.
- Set up an email for the SHIFT API user. We suggest structuring the email as shiftapi@domainname.com. Note that this account will need to receive emails to complete the registration process.
- Invite the API user to SHIFT on the User Management page and give it a role of Admin. For more information on adding and managing users in shift, click here.
- Complete the registration process for the API user email address.
Once the API user is created, Pramana will provide a URL host, URL client, client_id and secret to be used in the authentication request. The username and password for the SHIFT API user will be used in the POST body to get a Bearer token. Note the Bearer token should be included in the header for all SHIFT API requests.
POST: https://<host>/oauth2/<client>/v1/token
Post Body
'Content-Type':'application/x-www-form-urlencoded',
'grant_type': 'password',
'username': .......',
'password': .......'
Authentication:
username: <client_id>
password: <secret>
Response JSON:
{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "..........",
"scope": "openid",
"id_token": "......."
}