Peleza β€” Trust built on data
Authentication
On this page

Authorization

Obtain an OAuth 2.0 access token using the client credentials flow. Generate client_id and client_secret from the credentials dashboard, then exchange them for a Bearer token.

Request

POST/api/v1/oauth/token
{{baseUrl}}/api/v1/oauth/token
HeaderTypeDescription
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
grant_typestringMust be "client_credentials"required
client_idstringClient ID from the credentials dashboardrequired
client_secretstringClient secret β€” store server-side onlyrequired

Response

200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Token generated successfully",
  "data": {
    "access_token": "exAmPlEtOkEn0123456789AbCdEfGhIjKlMnOpQrStUvWxYz",
    "token_type": "Bearer",
    "expires_in": 3600,
    "scope": "api"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440099"
}

Response Fields

FieldTypeDescription
successbooleanWhether the token request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
data.access_tokenstringToken to send as Bearer on API calls
data.token_typestringAlways "Bearer"
data.expires_innumberToken lifetime in seconds (typically 3600)
data.scopestringGranted scope, usually "api"
request_idstringUUID for support and audit trails

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.