Skip to content
Go to Micro

Realtime

Create a realtime streaming ticket
client.realtime.createTicket(RequestOptionsoptions?): RealtimeCreateTicketResponse { expires_in, ticket, ws_url }
POST/v2/realtime/ticket
ModelsExpand Collapse
RealtimeCreateTicketResponse { expires_in, ticket, ws_url }
expires_in: number

Seconds until the ticket expires. Refresh (call the endpoint again) before reconnecting.

ticket: string

Short-lived token authenticating a realtime WebSocket connection. Pass as the token query parameter when connecting.

ws_url: string | null

WebSocket URL for this environment (wss://stream.developers[.staging].micro.so). Connect here with the ticket as the token query parameter.