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 URLMethodAuthentication requirements
/v1/api/svplatform/tokenOauth2POST1. 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 TagDescriptionData type
clientId
Mandatory
Unique client identification detailsString
clientCode
Mandatory
Unique client secret code for authenticationString
grant_type
Mandatory
Type of grant provided for authentication. Here as client_credentialsString

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 TagDescriptionData type
access_tokenAccess tokenString
token_typeType of tokenString
expires_inTime for expiry of the access tokenString