Message Type | Description |
Text | The message content is plain text. |
Image | The message content includes the URL, dimensions, and size of the image. |
Emoji | Emoji messages are customized by developers. |
Audio | Audio data must include the duration in seconds. |
Location | The message content contains the caption, longitude, and latitude of the location. |
File | The message content includes the URL, size, and format of the file. There are no file format restrictions, and the maximum supported file size is 100 MB. |
Short video | The message content includes the URL, duration, size, and format of the short video file. The maximum file size supported is 100 MB. |
Custom | Message types that are customized by developers, such as red packet and rock-paper-scissor. |
System notification | This type of message is divided into built-in system notification messages and system notification messages customized by developers. |
Type | Feature Description | Application Scenario |
Send ordinary group messages | Group members can send messages through the Chat SDK APIs. By calling RESTful APIs, app admins can send messages in any group without joining the group. | Group members send messages in the group, and app admins can send messages in any group. |
Send group system messages | By calling RESTful APIs, app admins can send system messages in any group without joining the group. These system messages are only received by online group members and do not possess roaming capabilities. | App admins push time-sensitive notifications to all or a subset of online group members. |
Offline push of group messages | Supported by Apple, Huawei, Xiaomi, OPPO, vivo, and Meizu mobile phones | Offline push of group chat messages |
Receive online group messages | Group members can receive online group messages through the Chat SDK. | Online group members receive group messages in real time. |
Group members receive offline messages or historical messages | Group members can query message historical messages through the Chat SDK. | Group members receive offline messages when they go back online, and group members can view group chat history. |
App backend obtains group messages | App admins can download all messages generated during a certain time period through RESTful APIs. App admins can also obtain the chat history of any group through RESTful APIs. The app backend can obtain group messages through callback after messages are sent in the group. | Apps back up message history regularly. Apps need to quickly obtain the message history of specific groups. Apps need to obtain group messages in real time. |
Delete messages | Historical messages can be deleted through RESTful APIs to ensure that they will not be further propagated. | Delete malicious information in a group. |
Group messages carry sender profiles | Group messages can contain the sender nickname, profile photo, group name card, user-level custom fields, and member-level custom fields. | Display sender information such as the nickname and profile photo. |
Group message sending control | You can control group message sending by muting and webhook event before group messages are sent. | Prevent a group member from sending messages, prevent all group members from sending messages, and filter or modify messages at the app backend. |
Group message receiving control | You can set different message receiving options for individual groups: receive and notify, receive without notifying, and block messages. When receive without notifying is selected, iOS devices will disable APNs. | A user blocks messages from a group. |
Group message frequency control | Control the sending frequency of ordinary group messages. The default value is 40 messages per second. Group system messages sent by the app admin through RESTful APIs are not subject to frequency control. For more information, see the message priority and frequency control described below. | Prevent spam messages. |
Control Method | Description |
Mute group members | Prevent a group member from sending messages for a certain period of time. This feature is effective within a single group. If the muted user leaves the group and joins again, the user remains muted until the mute time expires. |
Webhook before group messages are sent | Before a message is delivered to group members, Chat checks with the app backend for permission. If not allowed, the message will not be delivered. After receiving a webhook, the app backend can modify the message content and return it to Chat, which will deliver the modified message. For more information, see Before Group Message Is Sent.After invoking a webhook, Chat will deliver the message directly if it does not receive a response in two seconds, without retrying. |
Priority | Recommended Message Type |
High | Red packet and prize message |
Normal | Plain text message |
Low | Like message |
sendMessage
to send messages to group C when user B is offline.
1.1 Group C is added to the recent contacts of user B, with up to 100 messages cached.
1.2 A user updates the message information of the group, including the latest group message seq.
1.3 Messages are stored on the roaming server for 7 days.login
API to log in to Chat.OnNewMessage
API.OnRefresh
API when group message synchronization is completed.getMessage
, and the SDK automatically pulls the messages from the roaming server.
Was this page helpful?