GET wss://live.handwrites.io/doc/{id}?token={roomToken} with WebSocket upgrade.POST /api/v1/documents/{id}/live. The admission response supplies the authoritative URL, short-lived token and viewer/editor role. Follow Socket specification notes for the complete binary frame contract, close codes and reconnect behavior.URL.searchParams.binaryType = "arraybuffer". A JSON text frame is not valid protocol data.[6] subscribes to full-text frames; each server response starts with type 6 followed by a lib0 varString. A real editor should use Yjs synchronization with doc.getText("content") and prevent remote-update echo loops.readonly; stop after denied or close 4403. Preserve pending local edits after transient failure. Do not blindly replay positional SPLICE frames.409 live_session_active while the room is open. The socket protocol does not emit an acknowledgment promising each edit has been durably saved.