SDK-NodeJS
SDK-NodeJS copied to clipboard
Broadcast not working
Hi guys,
I'm trying to do a message broadcast from a NodeJS backend.
For some reason, the connect.broadcastMessage() method enters on the then promise well.
It shows that the messages were posted fine.
Although, when I look at the Webchat conversation, it didn't displayed any message. I tryied to send a message to a single conversation and it works great, but the broadcast doesn't.
const recastai = require('recastai').default;
var connect = new recastai.connect("<REQUEST_TOKEN_HERE>");
connect.broadcastMessage([
{
type: 'text',
content: 'Roger that',
}
])
.then(function () {
console.log('Message successfully sent');
})
.catch(function (ex) {
console.log("error on sendMessage: ", ex);
});
Do you know what's the problem here?