Connecting
The WebSocket server is available at:HTTP 401 Unauthorized and closes the socket — no WebSocket connection is opened.
Because the session cookie is sent automatically by the browser during the upgrade handshake, you do not need to pass any credentials in the WebSocket constructor or send an authentication message after connecting.
Subscribing to Topics
Once connected, send a JSON message withtype: "subscribe" and a topics array containing the topic names you want to receive events for. You can subscribe to one topic or several at once.
Available Topics
Unsubscribing from Topics
Send a message withtype: "unsubscribe" and the topics you no longer want to receive. Topics not listed remain active.
Incoming Message Format
Every event the server pushes to your client follows this structure:
A minimal handler that routes messages by channel:
type value other than subscribe or unsubscribe), the server responds with an error object:
Connection Keep-Alive
The server sends a WebSocket ping frame to every connected client every 30 seconds. Your WebSocket client must respond with a pong frame to confirm the connection is still alive. Most browserWebSocket implementations handle ping/pong frames automatically and transparently — you do not need to write any code for this. If you are using a Node.js ws client or a similar library, respond to pings explicitly:
close event and implement reconnection logic with an appropriate back-off strategy.
