Complete Guide to Retrieving Messages in React Chat SDK
#
Get Reply MessageTo get the reply message by message id, send a request to the server as described below.
#
Request ParamsStatus | Description | Type | Required |
---|---|---|---|
REPLY_MESSAGE_ID | Reply Message ID | String | true |
CHAT_TYPE | Chat Type | String | false |
Note: CHAT_TYPE values are "chat"/"groupchat"
#
Response Format#
Get Media MessagesTo get the media messages for the particular chat, on initial request it fetches three media. Then on the pagination request by passing the last message-id, it fetches 10 next media messages.
caution
If getMediaMessages feature is unavailable for your plan, then it will throw 403 exception
Without Pagination
Without Pagination By Topic id
With Pagination
#
Request ParamStatus | Description | Type | Required |
---|---|---|---|
toJid | JID of the To User | JID String | true |
lastMsgId | Last Message ID of Pagination | String | false |
topicId | Topic id for the messages | String | false |
#
Response Format#
Get Chat MessagesTo get the chat history of the selected user, send a request to the server as described below.
Without Pagination
Without Pagination By Topic id
With Pagination using Row id
With Pagination using Message id
Example
#
Request ParamsStatus | Description | Type | Required |
---|---|---|---|
toJid | JID of the To User/Group | JID String | true |
position | Position for Pagination | String | false |
lastRowId | Last Row ID of Pagination | String | false |
limit | Pagination Limit | Number | false |
topicId | Topic id for the messages | String | false |
lastMessageId | Last Message ID of Pagination | String | false |
includeMsgObj | Include or not passing lastMessageId message object | Boolean | false |
Note: POSITION - Accepts "down"/"up", "includeMsgObj" - Applicable only to message id with pagination method
#
Response Format#
Get Message based on MsgIdUse the below method to get the message using the messageId which you got.
#
Example Request#
Response Format#
EmojisOur service allows you to send emojis of any kind, without any encryption.
#
Translate Message#
Get All Available Translate LanguagesRetrives all Available languages for the Translate from the Google API.
caution
If Translation feature is unavailable for your plan, then it will throw 403 exception
#
Example RequestRetrives the Translated Text for the provided Text with Target Language.
#
Response Format:#
Translate the Messagecaution
If Translation feature is unavailable for your plan, then it will throw 403 exception