Get Authorisation Token
Purpose
Endpoint
Environment | Endpoint URL |
---|---|
Test | https://olympus-pg-uat.enkash.in/api/v0/merchant/token |
Request Headers
Header | Value | Description |
---|---|---|
Content-Type | application/json | Specifies the media type of the request body. |
API-Key | Your unique API key | Provided by Enkash upon registration. |
Sample Request:
POST https://olympus-pg-uat.enkash.in/api/v0/merchant/token
Headers:
{
"Content-Type": "application/json",
"API-Key": "your-api-key"
}
Response
Field | Type | Description |
---|---|---|
token | string | The generated authentication token |
expiry | integer (int64) | Token expiration time in milliseconds |
resultCode | integer (int32) | Status code indicating the outcome of the token generation request |
resultMessage | string | Additional information about the request's result |
Sample Response:
{
"token": "abcdef1234567890",
"expiry": 1672531199000,
"resultCode": 200,
"resultMessage": "Token generated successfully."
}
Integration Notes
Authorization
header for all subsequent API requestsAuthorization: Bearer {token}
Ensure you handle token expiration by either:
Monitoring the expiry timestamp and refreshing the token in advance
Implementing retry logic for requests that fail due to expired tokens