Message By MetaData

To send custom data along with a message, you can use “metadata” param provided to all kinds of messages such as Text, Image, audio, video & document.

Request Param#

StatusDescriptionTypeRequired
META_DATAObject accepts upto 3 keys (Optional)Objectfalse

Text Message#

await SDK.sendTextMessage(`TO_USER_JID`, `MESSAGE_BODY`, `MESSAGE_ID`, `REPLY_TO`, `META_DATA`);

To learn more on request and response about ' Text Message ' see the Text Message Section

Image Message#

await SDK.sendImageMessage(`TO_USER_JID`, `FILE_DETAILS`, `FILE_OPTIONS`, `REPLY_TO`, `META_DATA`);

To learn more on request and response about ' Image Message ' see the Image Message Section

Audio Message#

await SDK.sendAudioMessage(`TO_USER_JID`, `AUDIO_FILE`, `FILE_OPTIONS`, `REPLY_TO`, `META_DATA`);

To learn more on request and response about ' Audio Message ' see the Audio Message Section

Video Message#

await SDK.sendVideoMessage(`TO_USER_JID`, `VIDEO_FILE`, `FILE_OPTIONS`, `REPLY_TO`, `META_DATA`);

To learn more on request and response about ' Video Message ' see the Video Message Section

Document Message#

await SDK.sendDocumentMessage(`TO_USER_JID`, `DOCUMENT_FILE`, `FILE_OPTIONS`, `REPLY_TO`, `META_DATA`);

To learn more on request and response about ' Document Message ' see the Document Message Section

Contact Message#

await SDK.sendContactMessage(`TO_USER_JID`, `CONTACTS`, `REPLY_TO`,`META_DATA` );

To learn more on request and response about ' Contact Message ' see the Contact Message Section

Contact Message#

await SDK.sendLocationMessage(`TO_USER_JID`, `LATITUDE`, `LONGITUDE`,`MESSAGE_ID`, `REPLY_TO`,`META_DATA` );

To learn more on request and response about ' Location Message ' see the Location Message Section