Skip to main content
POST
/
authentication-service
/
v1
/
api
/
generate-token
Get Authentication token
curl --request POST \
  --url https://sandbox.waftpay.io/api/authentication-service/v1/api/generate-token \
  --header 'Content-Type: application/json' \
  --data '
{
  "consumer_key": "APP_CONSUMER_KEY",
  "consumer_secret": "APP_CONSUMER_SECRET"
}
'
{
  "status": true,
  "message": "Request processed successfully",
  "token": "abcdeFGHIjklmno@1234567890...",
  "expires_in": 7200000
}

Overview

Use this endpoint to exchange your consumer_key and consumer_secret for a short-lived Bearer token. This is a server-to-server flow and does not require an existing Bearer token.

Request body

{
  "consumer_key": "APP_CONSUMER_KEY",
  "consumer_secret": "APP_CONSUMER_SECRET"
}

Example response (success)

{
  "status": true,
  "message": "Request processed successfully",
  "token": "abcdeFGHIjklmno@1234567890...",
  "expires_in": 7200000
}
Use the token in the Authorization header:
Authorization: Bearer <token>

Notes

  • Use the credentials for the specific product you are calling (Payouts, Collections, or Remittance).
  • If you regenerate your keys, the old credentials stop working immediately.

Body

application/json
consumer_secret
string
required
consumer_key
string<password>
required

Response

Authentication token generated successfully

status
boolean
required

Indicates if the request was successful

Example:

true

message
string
required
Example:

"Request processed successfully"

token
string
required

JWT bearer token to use in Authorization header

expires_in
integer
required

Token validity in milliseconds

Example:

7200000