Skip to main content
The WebSocket endpoint is the core of WireSocket. All Yjs document updates, awareness state (presence, cursors), and heartbeats flow through this high-performance connection.

Endpoint

Example: wss://eu-central-1.wiresocket.net/my-document-id

Authentication

The Data Plane supports three ways to authenticate the WebSocket handshake. Method 1 is recommended as it keeps the token out of browser history and server logs.

Connection Example

Using the standard y-websocket provider:

Close Codes (Error Reference)

If a connection is rejected or closed, the Data Plane returns one of the following codes:

Handling Redirection (4009)

If you receive a 4009 close code, your client should parse the reason string to find the correct regional URL and reconnect immediately:
Last modified on March 3, 2026