Skip to main content
POST
/
oauth
/
token
Get OAuth access token
curl --request POST \
  --url https://api-prod.blaaiz.com/oauth/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=YOUR_CLIENT_ID \
  --data client_secret=YOUR_CLIENT_SECRET \
  --data 'scope=wallet:read payout:create transaction:read'
{
  "token_type": "Bearer",
  "expires_in": 900,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..."
}

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

OAuth grant type for machine-to-machine access.

Available options:
client_credentials
client_id
string
required

OAuth client identifier from your Blaaiz dashboard.

client_secret
string
required

OAuth client secret from your Blaaiz dashboard.

scope
string
required

Space-separated list of scopes assigned to your OAuth credentials. Request all or a subset of the scopes from your credential.

Example:

"wallet:read payout:create transaction:read"

Response

Access token issued successfully

token_type
string
required
Example:

"Bearer"

expires_in
integer
required

Number of seconds before the access token expires.

Example:

900

access_token
string
required

Short-lived Bearer token for calling external API endpoints.