Docs

Protocol

How clients connect to the service, and the REST API for everything else.

Realtime traffic runs over a single WebSocket to wss://realtime.foony.io. Everything that does not need a live connection is a plain HTTPS call to the same host.

The WebSocket connection

A client connects, authenticates in its first frame with either a token or an API key, and receives a connected frame carrying its server-assigned connectionId, its authenticated clientId, and a keepAliveMs interval. The SDK pings on that interval so idle proxies never cull the socket.

After a brief disconnect, a client can present its previous connectionId on reconnect to keep presence continuity, and per-channel sequence numbers let it detect and backfill anything it missed while away.

The wire format is SDK-only

Since SDK 0.12 the socket speaks a compact binary framing, and the JSON protocol that preceded it has been removed. The framing is internal and changes between SDK versions without notice, so it is not a supported integration surface. Integrate through the JavaScript SDK, or through the REST API below from any language.

Everything else is REST

All non-live operations, publishing, history, presence snapshots, and token minting, are plain HTTPS calls to the same host. The full endpoint reference is the REST API page. Error codes are shared between REST and the WebSocket and are listed in Errors.