Appearance
Tokens
Minting and checking access tokens on the server, for tenants that would rather not mint locally.
Mint an access token on the server
POST /v1/tokens
For a tenant that would rather not mint locally. It costs a network round trip that local minting (@talkline/server-sdk, or any HS256 JWT library) does not, on the path to every connect. The grants are narrowed by the application's grant ceiling.
Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute
Request body application/json
| Field | Type | Description |
|---|---|---|
identity | string | Becomes the token's sub. 1–200 characters. |
name? | string | At most 120 characters. |
ref? | string | At most 120 characters. |
metadata? | object | The tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it. |
grants? | object | { roomJoin: true, canSubscribe: true } unless given. |
grants.roomJoin? | boolean | |
grants.room? | string | A room sid or name. At most 200 characters. |
grants.roomCreate? | boolean | |
grants.roomAdmin? | boolean | Mute and evict others, end the room. |
grants.roomList? | boolean | |
grants.canPublish? | boolean | |
grants.canSubscribe? | boolean | |
grants.canPublishData? | boolean | |
grants.canPublishSources? | string[] | Each one of microphone, camera, screen, screen_audio. |
grants.hidden? | boolean | In the room and invisible to the others — a supervisor. |
grants.recorder? | boolean | |
grants.canUpdateOwnMetadata? | boolean | Default false. |
ttlSec? | integer | 1–600. Default 300. |
Response 201 — The token, and the grants it carries.
| Field | Type | Description |
|---|---|---|
token | string | |
grants | Grants | What a participant may do. Every name is one the model has; any other is refused rather than ignored. |
note | string |
Errors
Verify an access token exactly as signaling will — and spend it
POST /v1/tokens/introspect
Claims the token's jti, so introspecting a token consumes it: a check that did not would be a way to test a token without spending it.
Credential: API key — Authorization: Bearer <api_key>.<api_secret>
Rate limit: write, 120 a minute
Request body application/json
| Field | Type | Description |
|---|---|---|
token | string | 1–8192 characters. |
Response 200 — What the token says, and what the server grants it.
| Field | Type | Description |
|---|---|---|
identity | string | |
name? | string | |
ref? | string | |
metadata | object | The tenant's own JSON, at most 4 096 bytes as UTF-8. The platform never reads it. |
expiresAt | string (date-time) | |
requestedGrants | object | The token's grants claim as it was minted. |
grants | object | What the server grants — never wider than asked. |
grants.roomJoin? | boolean | |
grants.room? | string | A room sid or name. At most 200 characters. |
grants.roomCreate? | boolean | |
grants.roomAdmin? | boolean | Mute and evict others, end the room. |
grants.roomList? | boolean | |
grants.canPublish? | boolean | |
grants.canSubscribe? | boolean | |
grants.canPublishData? | boolean | |
grants.canPublishSources? | string[] | Each one of microphone, camera, screen, screen_audio. |
grants.hidden? | boolean | In the room and invisible to the others — a supervisor. |
grants.recorder? | boolean | |
grants.canUpdateOwnMetadata? | boolean | Default false. |
Errors