receiverList).
createXxxMessage API (here, Xxx indicates the message type) to create a message (specify the message recipients via receiverList).sendMessage API to send the message.// Create a targeted group messagelet message = chat.createTextMessage({to: 'test',conversationType: TencentCloudChat.TYPES.CONV_GROUP,payload: {text: 'Hello world!'},receiverList: ['user0', 'user1']});// Send the messagelet promise = chat.sendMessage(message);promise.then(function(imResponse) {// Message sent successfullyconsole.log(imResponse);}).catch(function(imError){// The message failed to be sentconsole.warn('sendMessage error:', imError);});
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback