Hi everyone, I’m trying subcribe to a livechat room after i created following the document here https://rocket.chat/docs/developer-guides/realtime-api/livechat-api/registerguest/
after that I have a token of client, I want stream all message in that room, i get infomation of that room by Postman
and I subcribe this channel by this code (i use “ddp” module)
ddpclient.connect(function(err, wasConnect){
if(err){
console.log(“error !!”)
}
if (wasConnect) {
console.log(‘Reestablishment of a connection.’);
}
console.log('connected!');
ddpclient.subscribe("stream-livechat-room",[
"KTZqPAR9DQGxKcxzf",
{"id":"m73XnAJvFGDyhj4kE"},
{
"useCollection":false,
"args":[
{
"token":"TF5rZ7BZ9mZCSq3xQ"
}
]
}
], function(err, res){
if(err) console.log(err);
console.log(res);
})
})
Result is alway that response
{ isClientSafe: true,
error: 400,
reason: ‘Match failed’,
message: ‘Match failed [400]’,
errorType: ‘Meteor.Error’ }
please tell me what can i resolve this problem ??