Topic Based Chat
Topic based chat lets you to group the chat by topic. You can create the topic , send all types of messages with topic information and thus you can receive the messages by topic.
Create Topic#
You can use the below given method to create a new topic
Request Params#
| Status | Description | Type | Required |
|---|---|---|---|
topicName | Topic name for the creation. We accept only the AlphaNumeric String | String | true |
metaData | metaData is an optional parameter to provide MetaData of topic key pair value as string. Maximum size is 3 | Object | false |
Sample Response:#
Get Topics#
Use the below method to get topics details.
Request Params#
| Status | Description | Type | Required |
|---|---|---|---|
TOPIC_IDS | List of Topic ids | Array of Strings | true |
Example Response#
Send Message#
To send the message to the user, use the below methods. Different messages such as text, image, audio, video & document type messages can be sent using the below methods.
Text Message#
To learn more on request and response about ' Text Message ' see the Text Message Section
Image Message#
To learn more on request and response about ' Image Message ' see the Image Message Section
Audio Message#
To learn more on request and response about ' Audio Message ' see the Audio Message Section
Video Message#
To learn more on request and response about ' Video Message ' see the Video Message Section
Document Message#
To learn more on request and response about ' Document Message ' see the Document Message Section
Meet Message#
Before you send the meet message, you need to create the meet link using the createMeetLink method. Once the meet link has been created successfully, you can send the Meet message.
caution
If Group call feature is unavailable for your plan, then it will throw 403 exception
Response Format#
You can send the meet message by using the sendMeetMessage method. You can share the title, link and schdueled date and time using this method.
caution
If Group call feature is unavailable for your plan, then it will throw 403 exception
| Param | Description | Type | Required |
|---|---|---|---|
| toJid | JID of the To User/GROUP | JID String | true |
| link | Meet Link which we need to share | String | true |
| scheduledDateTime | Scheduled Date and Time | Number (Timestamp) | true |
| title | Meet Title which we need to share | String | false |
| mentionedUsersIds | Array of Group Mentioned UsersIds | Array of String | false |
| topicId | Topic Id for the Message | String | false |
| metaData | MetaData for the Message | String | false |
Response Format:#
Send Reply Message#
To send a reply to the original message, we are using sendTextMessage by passing in the additional parameter original message-id.
Receive a Message#
To receive a metaData related message from another user you must implement the messageListener function. It’s a function that will be triggered whenever you receive a new message or related event in the chat.
note
To learn more on 'message listener callbacks,' see the Message Callback Event Listener Section
Get Chats By Topic Id#
Use the below method to get all the list of recent chats by topic id specific
Request Params#
| Status | Description | Type | Required |
|---|---|---|---|
topicId | Topic id for the recent chats. We accept only the AlphaNumeric String | String | false |
messageTime | Last chats message time of Pagination | String | false |
limit | Pagination Limit | Number | false |
Response Format:#
Get Messages#
To get the chat and media messages, use the below methods
Get Chat Messages#
To learn more on request and response about ' Get Chat Messages ' see the Get Chat Messages Section
Get Media Messages#
To learn more on request and response about ' Get Media Messages ' see the Get Media Messages Section