Skip to content
Tranzaq

API reference

Authentication

Get an access token with your client ID and secret.

Get an access token

POST/oauth/token

Trade your client ID and secret for a bearer token that lasts one hour. Send the credentials in the form body, or as an HTTP Basic header.

Form fields

grant_typestringrequiredAlways client_credentials.
client_idstringrequiredStarts with tqz_test_ or tqz_live_. Not needed if you use HTTP Basic.
client_secretstringrequiredShown once when you create the credentials. Not needed if you use HTTP Basic.
scopestringSpace-separated scopes. Leave out to receive every scope your credentials have; ask for fewer to narrow the token.
curl -X POST "https://api.tranzaq.com/oauth/token" \
  -d grant_type=client_credentials \
  -d client_id=tqz_test_1a2b3c4d \
  -d client_secret=$CLIENT_SECRET

Answer · 200

{
  "access_token": "eyJhbGciOiJIUzI1NiIs…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "balance.read payouts.write"
}

Errors

  • 400unsupported_grant_type: only client_credentials is supported. invalid_scope: you asked for a scope your credentials do not have.
  • 401invalid_client: the ID or secret is wrong, or the credentials were revoked, expired, or the business is not active.
  • 429More than 30 token requests a minute from one address.