Create a realtime streaming ticket

Changed on

Exchange your API key (or session) for a short-lived ticket that authenticates a connection to the realtime object-change stream. Open a WebSocket to the push endpoint with the returned ticket as the token query parameter. The ticket is single-purpose and expires quickly; call this again to obtain a fresh one before reconnecting.

post/v2/realtime/ticket

Request

  • Base URL
    https://developers.micro.so
  • URL
    https://developers.micro.so/v2/realtime/ticket
  • Auth
    API key in header x-api-key

Response

OK

ticketstring required

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

expires_ininteger required

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

ws_urlstring nullable required

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

Changes