Authentication

Exchange your client credentials for a 24-hour access token.

All Cloud Middleware requests require authentication. Exchange your client credentials for an access token, which is valid for 24 hours.

Get access token — POST /api/auth/getToken

Generates an authentication token for API access.

This requires the client credentials which need to be requested from Nami team

Request parameters

ParameterTypeRequiredDescription
clientIdstringYesYour unique client identifier
clientSecretstringYesYour client secret key

Request

{
  "clientId": "merchant1",
  "clientSecret": "pos123"
}

Response

{
  "tokenGenerationTime": "25-03-2026T09:29:43",
  "tokenExpirationTime": "26-03-2026T09:29:42",
  "clientId": "merchant1",
  "statusCode": 200,
  "statusMessage": "Authentication successful"
}

🚧

The token will be present in the response header

📘

Tokens expire after 24 hours

Cache the token and refresh it before tokenExpirationTime. A request made with an expired token returns 401 (see Status Codes).


Did this page help you?