Skip to main content
Clody delivers live updates — new messages, reactions, friend requests, voice calls, and more — through Socket.IO. Instead of polling the REST API, your client connects once and receives events the moment they happen. Authentication reuses your existing session cookie, so no extra token exchange is required.

Connecting

Clody exposes two Socket.IO namespaces: Connect to the main namespace right after the user logs in. The server reads your session cookie automatically:

Connection Handshake

After the TCP connection is established, the server emits one of three events before any other activity:
You will not receive any message or friend events until the server emits success. Always listen for this event before treating the connection as ready.

Main Namespace (/) Event Reference

All events below are server → client unless noted otherwise.

Branch Events

Picnic Events

Reaction Events

Friend Events

Voice Call Events

These arrive on the main / namespace (not /bcalls) and notify you of call activity in your Branches.

Session Events

/bcalls Namespace Event Reference

Connect to the /bcalls namespace to participate in voice calls. See the Voice Calls guide for the full workflow.

Full Connection Example

The snippet below shows a minimal client that connects to both namespaces, handles the handshake, and listens for Branch messages and incoming calls.
If you are building a web app, include withCredentials: true on every io() call so the browser forwards the session cookie on the WebSocket upgrade request.