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 URL | HTTP Operation | Grant Type | Scope |
---|---|---|---|
/v1/api/observice/token | POST | 1. 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 Tag | Description | Data 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 request | String |
Sample Response
{
"success": true,
"payload": {
"access_token": "Access_Token_String",
"token_type": "Bearer",
"expires_in": 0000
}
}
Response description
JSON Tag | Description | Data Type |
---|---|---|
success | Response of the processing of the request as true or false | Boolean |
payload | Payload response of the request | Object |
access_token | Encrypted access token key | String |
token_type | Type of token obtained | String |
expires_in | Expiry of the token obtained | Numerical |
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 Tag | Description | Data type |
---|---|---|
status | Status of the response | String |
errorCode | Error Code | String |
message | Response Message | String |
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 Tag | Description | Data type |
---|---|---|
status | Status of the response | String |
errorCode | Error Code | String |
message | Response Message | String |
Updated 4 days ago