send Client messages
Every client message is a JSON object with an op field that selects the
action. Unrecognized messages are ignored, except a second auth, which
is a protocol error that closes the connection.
auth
Authenticate a connection that did not send an Authorization header.
| Field | Type | Description |
|---|---|---|
oprequired | object | |
tokenrequired | string | A session token, guest token, or API key. |
subscribe
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | The topic to subscribe to.
|
channel | string | The channel id to subscribe to. Required for |
unsubscribe
| Field | Type | Description |
|---|---|---|
oprequired | object | |
topicrequired | string | |
channel | string | The channel to leave. Required for |
chat.send
| Field | Type | Description |
|---|---|---|
oprequired | object | |
channelrequired | string | |
textrequired | string | The message text. Escape it when rendering as HTML. |
reply_parent_msg_id | string <uuid> | The message being replied to. Optional. Must belong to the same channel, otherwise the send is rejected. |