The Caliza API uses the OAuth 2.0 standard for authentication. Make all requests to protected endpoints via HTTPS and include a valid Bearer Token in the header.
Overview
To interact with the API, you must exchange your integrator credentials (Client ID, Client Secret, Username, and Password) for a temporary access token.
- Standard: OAuth 2.0
- Token Type: Bearer JWT
- Required Credentials:
client_id,client_secret,username,password
Step 1: Get credentials
Before starting, you need credentials to access the environment (Sandbox or Production).
- Dashboard Access: Once you finish onboarding and compliance, you'll get an email with a link to create your password.
- Client ID and Secret: In the integrator Dashboard, navigate to the profile/settings section to view your
Client IDandClient Secret.
Sandbox vs. Production EnvironmentIn Sandbox, you receive credentials along with the integration guide. In Production, you receive them after testing validation.
Step 2: Generate an Access Token
To get the token, make a POST request to the authentication endpoint, sending your credentials in the request body.
curl --location 'https://api.sandbox.caliza.com/auth/realms/caliza/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'username=YOUR_EMAIL' \
--data-urlencode 'password=YOUR_PASSWORD'{
"access_token": "eyJhbGciOiJIUzI1Ni...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "read write"
}Body Parameters: x-www-form-urlencoded or JSON, where:
| Parameter | Description |
|---|---|
grant_type | Typically password |
client_id | Your integrator/client ID |
client_secret | Your integrator/client secret |
username | Your username or email |
password | The password you set |
Expected ResponseThe API returns a JSON object containing the
access_token, the token typeBearer, and the expiration timeexpires_in.
Step 3: Use the Token in the API
With the token in hand, you must include it in the Authorization header of all subsequent API calls. The format must be Bearer <access_token>.
Authenticated Call Example
Below is an example of how to query integrator data using the generated token.
Endpoint: GET /v1/integrators/me
curl --location 'https://api.sandbox.caliza.com/core-api/v1/integrators/me' \
--header 'Authorization: Bearer Your_Token' \
--header 'Content-Type: application/json'Auth Error Handling
Here you can find the standard HTTP status codes related to authentication errors:
| Code | Description |
|---|---|
401 Unauthorized | The token is not valid, has expired, or was not sent. Generate a new token by repeating Step 2. |
403 Forbidden | The token is valid, but the user does not have permission to access the specific resource. |
