Get auth token
Obtain a JWT access token using OAuth2 client credentials.
Request
/api/public/security/auth
Authentication: None
Body
| Field | Type | Required | Description |
|---|
client_id | string | Yes | Terminal OAuth2 client ID |
client_secret | string | Yes | Terminal OAuth2 client secret |
Response 200
| Field | Type | Description |
|---|
token | string | JWT Bearer token |
expiresIn | number | Expiration in seconds |
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
"expiresIn": 3600
}
Errors
| Status | Description |
|---|
400 | Validation failed (client_id or client_secret missing) |
401 | Invalid credentials |
500 | Internal error |
Example
curl -X POST "https://vpay.didi.cr/api/public/security/auth" \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}'