Website
Community
User Documentation
Free Trial
Search…
Rocket.Chat Developer
Quick Start
Choosing a Deployment Host
Setting up your Development Environment
Rocket.Chat
Rocket Chat Environment Setup
Repository Structure
Deeplink
Two Factor Authentication
Embedded Layout
White Labelling Rocket.Chat
Iframe Integration
Contribute to Rocket.Chat
Mobile App
Mobile App Environment Setup
Testing your Mobile App
Mobile App White Labelling
Mobile App FAQs
Desktop App
Desktop App Environment Setup
Developing your Desktop App
Debugging your Desktop App
Desktop App White Labelling
Omnichannel
Omnichannel Environment Setup
Developing Omnichannel Apps
Livechat Widget Development and Customization
Apps Engine
Rocket.Chat App
Rocket.Chat Apps Engine
Omnichannel FAQs
Getting Started
Adding Features
Testing your App
Sample App Snippets
Slack Compatibility
App Submission to the Marketplace
Apps-Engine API Reference
Bots
Bots Development Environment Setup
Bots Architecture
Creating Your Own Bot From Scratch
Bots FAQs
Reference
Database Schema
API
Deprecation
Schema Definition
Schema Definition v2 (Draft)
Realtime API
Method Calls
Two Factor Authentication
Livechat Realtime API
Subscriptions
stream-notify-all
stream-notify-logged
stream-notify-room-users
stream-notify-room
stream-notify-user
stream-room-messages
REST API
Livechat Widget API
Fuselage
Contributing
Powered By
GitBook
stream-room-messages
Subscribe
This is the room messages stream. You just need the room ID for subscribing.
DDP Message
1
{
2
"msg"
:
"sub"
,
3
"id"
:
"6NctZomXL3ZdtKNsn"
,
4
"name"
:
"stream-livechat-room"
,
5
"params"
:
[
6
"KTZqPAR9DQGxKcxzf"
,
7
{
8
"useCollection"
:
false
,
9
"args"
:
[
10
{
11
"token"
:
"jkGaw6duhiuh45"
12
}
13
]
14
}
15
]
16
}
;
Copied!
Sample Response
1
{
2
"msg"
:
"ready"
,
3
"subs"
:
[
4
"JHalkajwdh67"
5
]
6
j
Copied!
Unsubscribe
To unsubscribe from a room, send "unsub", along with the ID of the previous subscribe message.
1
{
2
"msg"
:
"unsub"
,
3
"id"
:
"unique-id"
,
4
}
Copied!
If you want to subscribe to a user's messages stream, just pass
__my_messages__
as the room ID.
Previous
stream-notify-user
Next
REST API
Last modified
3d ago
Export as PDF
Copy link
Edit on GitHub
Contents
Subscribe
DDP Message
Sample Response
Unsubscribe