Complete Guide to Retrieving Messages in React Chat SDK
Get Reply Message#
To get the reply message by message id, send a request to the server as described below.
Request Params#
| Status | 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 Messages#
To 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 Param#
| Status | 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 Messages#
To 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 Params#
| Status | 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 MsgId#
Use the below method to get the message using the messageId which you got.
Example Request#
Response Format#
Emojis#
Our service allows you to send emojis of any kind, without any encryption.
Translate Message#
Get All Available Translate Languages#
Retrives 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 Request#
Retrives the Translated Text for the provided Text with Target Language.
Response Format:#
Translate the Message#
caution
If Translation feature is unavailable for your plan, then it will throw 403 exception