You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How chat events from front end are consumed in NodejS backend. Because I am seeing on twilio docs its built in APIs for chat room creation, adding members, send messages to channel.
How chat events from front end are consumed in NodejS backend. Because I am seeing on twilio docs its built in APIs for chat room creation, adding members, send messages to channel.
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);
client.chat.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.channels('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.messages
.create({body: 'MESSAGE'})
.then(message => console.log(message.sid));
Are we sending messages through above API or we have events for same.