← All groups
POST /auth/ws-ticket
Get a one-time WebSocket ticket
Scope: messages:realtime:connect · Called with: appToken · operationId: ws-ticket
Required app scope: messages:realtime:connect.
Exchanges a valid JWT for a one-time WebSocket ticket (30s TTL) in the standard envelope (ticket under data). The caller must have active org membership. Use as: ws://host/ws?ticket=. A short-lived token from POST /auth/pat/exchange or a workspace app access token (POST /api/v1/apps/token) also gets a ticket when it carries messages:realtime:connect (otherwise 403 AUTH_PAT_INSUFFICIENT_SCOPE / AUTH_APP_INSUFFICIENT_SCOPE); the ticket then carries the token's scopes, its credential id (the source key, or the app installation) and its expiry, and expires no later than the token, so that the realtime connection filters pushed frames by those scopes and closes the connection when the token expires, the key is revoked, or the app installation is suspended, uninstalled or has its grant narrowed. Redeeming an app token ticket re-checks the installation and member. App tokens get tickets only where realtime access for apps is enabled on the deployment (otherwise 403 AUTH_APP_REALTIME_DISABLED). A personal access token itself gets 403 AUTH_REALTIME_REQUIRES_EXCHANGED_TOKEN.
Responses