API Keys and Authentication
Peleza APIs use OAuth 2.0 client credentials. Create credentials in the merchant dashboard, exchange them for a Bearer token, then call verification endpoints.
Environments
Use the sandbox for sample data and production for live verifications.
- Production base URL:
https://api.peleza.com - Sandbox base URL:
https://sandbox.peleza.com
Paths in this docs site are relative to the base URL you choose (for example {{baseUrl}}/api/v1/oauth/token). Do not mix sandbox keys with the production host.
1. Generate credentials
From Manage Credentials in the Peleza dashboard, create an API client. You receive a client_id and client_secret. Store the secret in server-side environment variables only β never ship it in mobile apps or browser code. Use separate credentials for sandbox and production.
2. Get an access token
POST /api/v1/oauth/token with grant_type client_credentials, your client_id, and client_secret against your chosen base URL (for example https://sandbox.peleza.com/api/v1/oauth/token). The response includes access_token, token_type Bearer, expires_in (typically 3600 seconds), and scope api. Cache the token and refresh before expiry.
3. Call APIs
Send Authorization: Bearer YOUR_ACCESS_TOKEN and Content-Type: application/json on subsequent requests to the same base URL. See Authorization in the API sidebar for full request and response examples.
