Exchange credentials for a token

Try it in the sandbox

Exchange your client_key/client_secret pair for a short-lived bearer token used to authenticate against every other partner endpoint.

POSThttps://kicbak.co/api/third-party/v1/auth/token

Authentication

This endpoint itself is unauthenticated — it is how you obtain a token. Your client_key and client_secret go in the JSON body, not headers. Sandbox keys start with tpc_sb_ and reach a separate database.

Request body

FieldTypeRequiredDescription
client_keystringrequiredYour client's public key.
client_secretstringrequiredYour client's secret. Shown only once at creation time, so store it securely.

Code examples

bash
curl -X POST https://kicbak.co/api/third-party/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "client_key": "YOUR_CLIENT_KEY",
    "client_secret": "YOUR_CLIENT_SECRET"
  }'

Responses

Every response is JSON with a status field (1 success, 0 failure). Failures also carry a code your error handler can branch on — it never changes if we reword message.

json
{
  "status": 1,
  "message": "Token generated successfully",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expiresAt": "2026-07-18T12:00:00.000Z"
}

Error reference

StatusCodeMeaning
400Missing client_key or client_secret in the body.
401client_key does not match an active client, or client_secret is wrong ("Invalid credentials").
401CREDENTIAL_EXPIREDThe credential is past its expiry — a new token cannot be minted; request a new credential.
500Unexpected server error. Safe to retry.
503MISCONFIGUREDPartner authentication is temporarily unavailable on our side — your credentials are fine. Retry shortly.