Mint a short-lived client-access token
POST /v1/tracking/client-tokens · Authorization: Bearer
POST
/v1/tracking/client-tokensMint a short-lived client-access token
Server-to-server only. Exchanges an organization API key (scope client_tokens:mint) for a short-lived opaque bdy_cli_* bearer authorizing READ-ONLY realtime on an explicit, immutable subject set. The plaintext token is returned exactly once.
- Credential
Authorization: Bearer- Plane
https://api.bardiyamap.com- Operation id
mintClientToken
Parameters
This operation takes no parameters.
Request body
application/json · required
| Field | Type | Required | Notes |
|---|---|---|---|
subjects | PublicSubjectRef[] | no | Subjects the token may act for. A token is scoped, never global. |
subscription_ids | string (uuid)[] | no | Restrict the token to these subscriptions instead of every subscription of the subject. |
ttl_seconds | integer | no | Token lifetime. Keep it short: the token is meant to be handed to a device and rotated.>= 1 |
json
{
"subjects": [
{
"type": "vehicle",
"id": "veh-1042"
}
],
"subscription_ids": [
"sub_01HX9Z6Q3M"
],
"ttl_seconds": 900
}Request example
shell
curl -X POST "https://api.bardiyamap.com/v1/tracking/client-tokens" \
-H "Authorization: Bearer $BARDIYA_TRACKING_KEY" \
-H "Content-Type: application/json" \
--data '{"subjects":[{"type":"vehicle","id":"veh-1042"}],"subscription_ids":["sub_01HX9Z6Q3M"],"ttl_seconds":900}'Response 201 · ClientTokenMinted
| Field | Type | Required | Notes |
|---|---|---|---|
capability | string | yes | |
created_at | string (date-time) | yes | date-time |
expires_at | string | null | no | date-time |
id | string | yes | |
revoked | boolean | no | |
subjects | PublicSubjectRef[] | yes | |
token_prefix | string | yes | |
token | string | yes | The plaintext credential. Returned exactly once by the server. |
ttl_seconds | integer | yes |
Errors
| Status | Meaning |
|---|---|
400 | Request is malformed or a parameter is out of range |
401 | Authentication failed |
403 | Required scope is missing |
404 | Resource not found or is not visible to this tenant |
409 | Conflict or idempotency error |
422 | Validation Error |
429 | Rate limit or quota exceeded; honour `Retry-After` |
503 | Public transport is temporarily unavailable |
Error bodies use the shared envelope documented in Errors: { "error": { "code", "message", "details", "request_id" } }.
POST /v1/tracking/client-tokens is part of the Client Tokens group. Values on this page are generated from contract version 1.1.0.
