Get Access Token
Get an authorized access to API communications
Overview
Access Token acts as an authentication value that helps SingleView APIs determine that a request is valid and is made by an authorized person.
A user should process a POST
request to the concerned end-point to generate an access token.
Endpoint details
Endpoint URL | Method | Authentication requirements |
---|---|---|
/v1/api/svplatform/tokenOauth2 | POST | 1. clientid 2. clientsecret 3. SVReferenceID 4. CompanyId |
The request is posted to the endpoint mentioned above in the specified format with all the required details. The system then processes the information to authenticate, and a response is generated based on the validity of the details.
Sample request
curl --location 'https://sandboxapi.onesingleview.com/v1/api/svplatform/tokenOauth2' \
--header 'clientsecret: Enter-Client-Secret'
--header 'clientid: Enter-Client-Id'
--header 'SVReferenceID: Enter-SV-Reference-Id'
--header 'Device: Device-type'
--header 'DateTimeStamp: YYYY-MM-DDTHH:MM:SS'
--header 'CompanyId: Enter-Company-Id'
--header 'Content-Type: application/json'
--data-raw '{
"clientId": "Enter_Client_Id",
"clientCode": "Enter_Client_Code",
"grant_type": "client_credentials",
}'
Description:
JSON Tag | Description | Data type |
---|---|---|
clientId Mandatory | Unique client identification details | String |
clientCode Mandatory | Unique client secret code for authentication | String |
grant_type Mandatory | Type of grant provided for authentication. Here as client_credentials | String |
Sample response
Valid response
✔️ Response occurs if the request is valid and is successfully authenticated and processed
{
"access_token": "iersttsdtddd56gddgdhd789dhsdjfkhfjffk90mckd",
"token_type": "Bearer",
"expires_in": "6000"
}
Description:
JSON Tag | Description | Data type |
---|---|---|
access_token | Access token | String |
token_type | Type of token | String |
expires_in | Time for expiry of the access token | String |
Updated 6 months ago