/
sendMessage

sendMessage

Sends a message in the chat room.

Parameters:

Name

Mandatory

Type

Description

Name

Mandatory

Type

Description

text

yes

string

Text to send

replyTo

no

string

Message ID you are replying to

Returns:

Type

Description

Type

Description

JS Promise

A Javascript Promise that returns the message id that has been sent

Example:

contact.sendMessage("Hello world!").then( function(msgid){ console.log("Message sent. ID [" + msgid + "]"); } ).catch( function (err) { console.log("[SEND MESSAGE] [ERROR]", err); } );

Related content

SendLink
SendLink
More like this
SendMultimediaMessage
SendMultimediaMessage
More like this
getTranscriptByChatID
getTranscriptByChatID
More like this
joinContact
joinContact
More like this
messageSeen
messageSeen
More like this
GetMultimediaMessageInActiveChat
GetMultimediaMessageInActiveChat
More like this