V1 and V2 Basic Authentication Setup and details

Basic Authentication Steps for V1 and V2 REST API

  1. Create an Integration User at Company Workspace > User Administration > Integration User.
  2. Make sure the integration user has the required module permissions enabled.

Integration user token expiration can be set from the Integration user UI. User can create, update Auth Token expiry date to - days, hours and minutes.

1 to 500 is a valid value for Expiry Duration.

By default the value is set to 180 days.

Auth Token:

An authentication token is required to access the rest services.

Token is set to be valid for date/time available in the response.

The token can be obtained by the below url.

http://<host>:<port./ws/rest/service/v1/login

Method - GET

Headers -Authorization:Basic <Basic Auth of integration user>

To Generate one via Postman rest client:

  1. Go to Authorization tab and from the Type drop-down select Basic Auth.
  2. Enter the Integration user name and password.
  3. Click Update Request. This generates the necessary Authorization header in Headers tab.

If the user name/password combination shared in the above Authorization Header is not valid/correct, then the service throws 401 status code (Unauthorized).

Other conditions that are checked:

Integration user has to be active.

The expiry date is displayed as per the user date format preferences set in the Integration UI.

Sample response

{

"expiryDate": "05/18/2021",

"Timezone": "(UTC-08:00) Pacific Time (US & Canada)",

"expiryTime": "05/18/2021 11:44 AM",

"status": 200,

"token": "eyJ0eXAiOiJEQiJ9.eyJ1c2VybmFtZSI6IiQkZGVsdDMifQ==.02318C44-9F3A-F931-3F14-C6FA7576F55E7D8D9975C46B5805179BD10D890DF15F"

}

Token can now be used in all rest services for authentication mechanism. All rest services should have the below set in the 'Header'.

Header - Sample

Key

Value

Authorization

Bearer eyJ0eXAiOiJEQiJ9.eyJ1c2VybmFtZSI6IiQkZGVsdDMifQ==.02318C44-9F3A-F931-3F14-C6FA7576F55E7D8D9975C46B5805179BD10D890DF15F



Legal Notices | Your Privacy Rights
Copyright © 1998, 2022

Last Published Wednesday, May 25, 2022