Get Access Token

Overview

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.

📘

Important info

It is mandatory for a user to include a valid access token to facilitate their requests to access SingleView API services. An access token is valid for a limited period of 60 minutes from the time it is created.

Endpoint details

Endpoint URLHTTP OperationGrant TypeScope
/v1/api/observice/tokenPOST1. Client ID
2. Client Code
3. Merchant ID
4. Grant Type
5. Signature
Request to fetch the Access Token

Sample request

{
    "clientId":"Enter_Client_Id",
    "clientCode":"Enter_Client_Code",
    "merchantId":"Enter_Merchant_Id",
    "grantType":"client_credentials"
}

Request description

JSON TagDescriptionData Type
clientId
Mandatory
Unique authentication value assigned to the registered users known as "**Client ID**"String
clientCode
Mandatory
Unique authentication value assigned to the registered users known as "**Client Code**"String
merchantId
Mandatory
Unique authentication value assigned to every merchant created known as "**Merchant ID**"String
grantType
Mandatory
Type of grant being used to access and authenticate the requestString

Sample Response

{
    "success": true,
    "payload": {
        "access_token": "Access_Token_String",
        "token_type": "Bearer",
        "expires_in": 0000
    }
}	

Response description

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

Invalid response

❌ Response occurs if an invalid request format or details or invalid authentication exists

{
        status: "FAILURE",
        errorCode: "Error_Code",
        message: "Invalid_Message"
      }

Description:

JSON TagDescriptionData type
statusStatus of the responseString
errorCodeError CodeString
messageResponse MessageString

Technical error response

⚠️ Response occurs if a technical error is encountered during the processing of the request

{
        status: "TECHERROR",
        errorCode: "Error_Code",
        message: "Error_Message"
      }

Description:

JSON TagDescriptionData type
statusStatus of the responseString
errorCodeError CodeString
messageResponse MessageString