Get Access Token

Access Token is a security parameter that enables the users to sent authorized requests to the SingleView APIs. It is obtained during the initial login process. It is mandatory for a user to include a valid access token to facilitate their requests to access SingleView API services.

Note: Access Token is valid for a limited period of 60 minutes from the time it is created.

Endpoint details

Endpoint URLHTTP Operation
/v1/api/observice/tokenPOST

Samples

Here's a sample request and response to generate Access Token:

Sample Request

{
  "clientId":"abcdef83643f61c975",
  "clientCode":"zyxvw95cE163C03b7d1",
  "merchantId":"jklmno147852qrstuv",
  "grantType":"client_Credentials"
}

Request description

JSON Tag

Description

Data Type

clientId Mandatory

Unique authentication value assigned to the registered users as "Client ID"

String

clientCode
Mandatory

Unique authentication value assigned to the registered users as "Client Code"

String

merchantId
Mandatory

Unique authentication value assigned to every merchant as "Merchant ID"
UUID format

Alphanumeric

grantType
Mandatory

Type of grant being used to access and authenticate the request to be mentioned as Client_Credentials

String

Sample Response

{
  "success": true,
  "payload": {
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiTDNyMmpxV29JS2I4MTNodDBLWDB4QWZHUEs2N095R2lMZ285U1MxMFkzMzRRMERqQS96NUh2SXl6ZmF2bktCY05wQ1BpOWJBa0FUK01UT2JodHUrcnd4VkZ2QXhaSGQwWS9ZdzdwYlF4dDRUKytJa2VKN3lNUHQrS2RRRXF3VCs5KzU2bGFjWEhoZlJtWk1LS3E1SzhlTU5KMGpleUNNWmpyL1k4ckFmVFZZWXhkVUlkaTlSTldnUS8zNTNQSEV4RHV5bGlIdTVxeVRCVkMvLyt3YlJIZ0lQbzZJSUF2NTNoZXIySFlQOVdSQzFNbldGaXc9PSIsImlhdCI6MTczODA2MDUwNiwiZXhwIjoxNzM4MDY0MTA2fQ.fT9ivV_HjhzgNnoH-CetAxl40InDxhTyIQ8UHGRHH7E",
    "token_type": "Bearer",
    "expires_in": 0000
  }
}	

Response description

JSON TagDescriptionData Type
successResponse of the processing of the request as true or falseBoolean
payloadTag carrying the payload response of the requestObject
access_tokenEncrypted access token keyString
token_typeType of token obtainedString
expires_inExpiry of the token obtainedNumerical