API reference / Obtain token
v1Get support

Obtain token

POST/auth/obtain/token
Public · credentials in body

Exchange your client credentials for a short-lived access token. Send the token as a Bearer token on every subsequent request.

Body parameters
FieldTypeReqDescription
clientIdstringYour API key identifier.
clientSecretstringThe secret half of your credential pair.
Returns

A token envelope containing accessToken, tokenType, and expiresIn. See the example response in the panel.

Sandbox only

Try this endpoint

This endpoint does not require bearer-token authentication.
Requests are proxied through the docs app and never sent to live.
ResponseWaiting for request
Send a sandbox request to see the response here.
curl https://api.dev.mightypay.io/auth/obtain/token \
-H "Content-Type: application/json" \
-d '{
"clientId": "ck_live_a91f8c2b...",
"clientSecret": "cs_live_7d2e44f9..."
}'
{
"status": "SUCCESS",
"statusCode": "00",
"sessionId": "sess_9f2c1a",
"data": {
"accessToken": "eyJhbGciOiJIUzI1Ni...",
"tokenType": "Bearer",
"expiresIn": 3600
}
}