The Rocket.Chat real-time API allows developers to integrate Rocket real-time messaging and collaboration features in their applications. It utilizes WebSockets, a technology that enables real-time communication between a client (your application) and the Rocket.Chat server. By leveraging this API, you can create dynamic, interactive experiences within your application, enabling users to send and receive messages, participate in live chats, and access various collaboration features.
To get started with the Rocket.Chat Real-Time API, point your client to the WebSocket of the server you want to connect to:
For localhost, use
To ensure streamlined functionality within a single connection, we leverage RPC (Remote Procedure Call) using the following format:
... // per call defined data
type-of-communication" is defined based on its purpose:
The server periodically sends a "
ping" message, and it's essential to respond with a "
pong" message to maintain the connection. Failure to respond appropriately will result in the server closing the connection.
Last modified 4mo ago