realtime_tokens_create
Mint a short-lived capability token (JWT) from namespace policy and grants, and return the gateway WebSocket URL.
Mint a short-lived capability token (JWT) from namespace policy and grants, and return the gateway WebSocket URL. A non-empty channels list filters capabilities to matching channels; omit it to skip that filter. Namespaces with a subscription proxy still require concrete requested channels approved by the proxy.
Behavior
- HTTP
POST /realtime/tokens
Arguments
Name | Type | Required | Description |
|---|---|---|---|
channels | array | — | Concrete channels to filter the resolved capabilities to; omit to receive all capabilities the identity has |
Response
Field | Type | Always | Description |
|---|---|---|---|
token | string | • | Signed EdDSA capability JWT (60s TTL) |
gatewayUrl | string | • | WebSocket URL of the realtime gateway to connect to |
Try it
Mint a short-lived capability token (JWT) from namespace policy and grants, and return the gateway WebSocket URL.