diff --git a/en-US/markdown/agora-chat/Develop/IP Allowlist/agora_chat_IP_allowlist.md b/en-US/markdown/agora-chat/Develop/IP Allowlist/agora_chat_IP_allowlist.md index b231a3f6e0c..322d0f2933f 100644 --- a/en-US/markdown/agora-chat/Develop/IP Allowlist/agora_chat_IP_allowlist.md +++ b/en-US/markdown/agora-chat/Develop/IP Allowlist/agora_chat_IP_allowlist.md @@ -21,28 +21,28 @@ Agora fully controls the servers and the traffic on the IP addresses of the acce | Domain Name | IP Address | Port | Platform | | :---------- | :------- | :----- | :------------- | -|[msync-api-41.chat.agora.io](http://msync-api-41.chat.agora.io/)|| 443 | Client SDKs (excluding web SDK) | -|[msync-im-41-tls.chat.agora.io](http://msync-im-41-tls.chat.agora.io/)|| 443 | Client SDKs (excluding web SDK) | +|[msync-api-41.chat.agora.io](http://msync-api-41.chat.agora.io/)|| 443 | Client SDKs | +|[msync-im-41-tls.chat.agora.io](http://msync-im-41-tls.chat.agora.io/)|| 443 | Client SDKs | |[a41.chat.agora.io](http://a41.chat.agora.io/)|| 443 | RESTful API| -|ap-america.agora.io||| Client SDKs (excluding web SDK) | +|ap-america.agora.io||| Client SDKs | **Singapore** | Domain Name | IP Address | Port | Platform | | :---------- | :------- | :----- | :------------- | -|[msync-api-61.chat.agora.io](http://msync-api-61.chat.agora.io/)|| 443 | Client SDKs (excluding web SDK) | -|[msync-im-61-tls.chat.agora.io](http://msync-im-61-tls.chat.agora.io/)|| 443 | Client SDKs (excluding web SDK) | +|[msync-api-61.chat.agora.io](http://msync-api-61.chat.agora.io/)|| 443 | Client SDKs | +|[msync-im-61-tls.chat.agora.io](http://msync-im-61-tls.chat.agora.io/)|| 443 | Client SDKs | |[a61.chat.agora.io](http://a61.chat.agora.io/)|| 443 | RESTful API| -|ap-asia.agora.io||| Client SDKs (excluding web SDK) | +|ap-asia.agora.io||| Client SDKs | **Frankfurt Germany** | Domain Name | IP Address | Port | Platform | | :---------- | :------- | :----- | :------------- | -|[msync-api-71.chat.agora.io](http://msync-api-71.chat.agora.io/)|| 443 | Client SDKs (excluding web SDK)| -|[msync-im-71-tls.chat.agora.io](http://msync-im-71-tls.chat.agora.io/)||443| Client SDKs (excluding web SDK) | +|[msync-api-71.chat.agora.io](http://msync-api-71.chat.agora.io/)|| 443 | Client SDKs | +|[msync-im-71-tls.chat.agora.io](http://msync-im-71-tls.chat.agora.io/)||443| Client SDKs | |[a71.chat.agora.io](http://a71.chat.agora.io/)|| 443 |RESTful API| -|ap-europe.agora.io||| Client SDKs (excluding web SDK)| +|ap-europe.agora.io||| Client SDKs | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_android.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_android.md index 7a19a3b8deb..0c7df2ac3e3 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_android.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_android.md @@ -185,12 +185,15 @@ For a group chat, group members can determine whether to require message read re The following table shows the restrictions of this feature: +// Add the modifications in the table also to iOS/Flutter/React Native/Unity/Windows platforms: + | Feature Restriction| Default | Description | | :--------- | :----- | :------- | -| Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | +| Permission | All group members | By default, all group members can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission only to the group owner and administrators.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | -| Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | -| Maximum number of group messages that can have read receipts per day | 500 | A group can have up to 500 messages each day for which read receipts can be returned. | +| Chat group size | 200 members | This feature is available only to groups with up to 200 members. If the upper limit is exceeded, no read receipts are returned for the message sent within the group. To increase the upper limit of group member count, you can contact support@agora.io. | +| View the number of read receipts returned for a group message | Message sender | By default, only the message sender can view the number of read receipts returned for a group message (or the number of group members that have returned the read receipts). To allow all group members to view the count, you can contact [support@agora.io](mailto:support@agora.io). | Follow the steps to implement read receipts for a chat group message: diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_flutter.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_flutter.md index 3e409ab36b4..06d5fe5dcbd 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_flutter.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_flutter.md @@ -157,6 +157,7 @@ The following table shows the restrictions of this feature: | Feature Restriction| Default | Description | | :--------- | :----- | :------- | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | | Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | | Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_ios.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_ios.md index 237ccb5c686..eb1f8262467 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_ios.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_ios.md @@ -146,6 +146,7 @@ The following table shows the restrictions of this feature: | Feature Restriction| Default | Description | | :--------- | :----- | :------- | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | | Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | | Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_rn.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_rn.md index 1c318b4e38f..a40c2fc399b 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_rn.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_rn.md @@ -232,6 +232,7 @@ The following table shows the restrictions of this feature: | Feature Restriction| Default | Description | | :--------- | :----- | :------- | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | | Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | | Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_unity.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_unity.md index 12315a04a33..0b60749f9c0 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_unity.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_unity.md @@ -175,7 +175,8 @@ For a group chat, group members can determine whether to require message read re The following table shows the restrictions of this feature: | Feature Restriction| Default | Description | -| :--------- | :----- | :------- | +| :--------- | :----- | :------- | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | | Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | | Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_web.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_web.md index 074e0ba5903..17560a0313d 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_web.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_web.md @@ -146,10 +146,11 @@ For a group chat, group members can determine whether to require message read re | Feature Restriction| Default | Description | Error | | :--------- | :----- | :------- | :------- | -| Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| The error "group ack msg permission denied" is returned if regular group members without the permission request read receipts when sending a message. | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | The error 503 "group ack not open" is returned if you fail to enable this feature before using it. | +| Permission | All group members | By default, all group members can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission only to the group owner and administrators.| If you only allow the group owner and administrators to send read receipts, the error "group ack msg permission denied" is returned if regular group members request read receipts when sending a message. | | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | The error "group ack msg not found" is returned if read receipts are sent three days after the message is sent. | -| Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. | If the upper limit is exceeded, no error is returned, but the latest read receipt record will overwrite the earliest one.| -| Maximum number of group messages that can have read receipts per day | 500 | A group can have up to 500 messages each day for which read receipts can be returned. | If the upper limit is exceeded, the error "limit send group ack msg" is returned. | +| Chat group size | 200 members | This feature is available only to groups with up to 200 members. If the upper limit is exceeded, no read receipts are returned for the message sent within the group. To increase the upper limit of group member count, you can contact support@agora.io. | | +| View the number of read receipts returned for a group message | Message sender | By default, only the message sender can view the number of read receipts returned for a group message (or the number of group members that have returned the read receipts). To allow all group members to view the count, you can contact [support@agora.io](mailto:support@agora.io). | | Follow the steps to implement read receipts for a chat group message: diff --git a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_windows.md b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_windows.md index c0c05e2e426..04110bb978e 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_windows.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Message Receipts/agora_chat_message_receipt_windows.md @@ -176,6 +176,7 @@ The following table shows the restrictions of this feature: | Feature Restriction| Default | Description | | :--------- | :----- | :------- | +| Enabling the function | Disabled | To use this feature, contact support@agora.io to enable it. | | Permission | Group owner and administrators | By default, only the group owner and administrators can request read receipts when sending a message.
You can contact [support@agora.io](mailto:support@agora.io) to grant the permission to regular group members.| | Number of days before read receipts cannot be returned after the message is sent | 3 days | The server no longer records the group members that read the message three days after it is sent, nor sends the read receipts. | | Chat group size | 500 members | This feature is available only to groups with up to 500 members. In other words, each message in a group can have up to 500 read receipts. If the upper limit is exceeded, the latest read receipt record will overwrite the earliest one. | diff --git a/en-US/markdown/agora-chat/Develop/Messages/Retrieve Messages/agora_chat_retrieve_message_rn.md b/en-US/markdown/agora-chat/Develop/Messages/Retrieve Messages/agora_chat_retrieve_message_rn.md index 47ff4ecc03d..abfebbd71ec 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Retrieve Messages/agora_chat_retrieve_message_rn.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Retrieve Messages/agora_chat_retrieve_message_rn.md @@ -110,7 +110,7 @@ Call `removeConversationFromServer` to delete conversations and their historical ```typescript // convId: conversation ID // convType: conversation type. -// isDeleteMessage: Whether to delete historical messages from the server with the conversation. +// isDeleteMessage: Whether to delete historical messages from the server and local storage with the conversation. ChatClient.getInstance() .chatManager.removeConversationFromServer(convId, convType, isDeleteMessage) .then(() => { diff --git a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_android.md b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_android.md index 637dd35a249..bfc8dbed63a 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_android.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_android.md @@ -97,7 +97,7 @@ After a message is sent, you can recall it. The `recallMessage` method recalls a You can recall a message sent within two minutes by default. If you want to adjust the time limit, contact [support@agora.io](mailto:support@agora.io). -
Except CMD messages, you can recall all types of message.
+
1. Except CMD messages, you can recall all types of message. 2. If an attachment message, like an image, voice, video, or file message, is recalled, the attachment of the message is also deleted.
// Add the note for all platforms/frameworks of the SDK. ```java try { diff --git a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_rn.md b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_rn.md index 87e1488ea2b..e0b92aac6c3 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_rn.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_rn.md @@ -85,6 +85,7 @@ if (messageType === ChatMessageType.TXT) { msg = ChatMessage.createTextMessage(targetId, content, chatType); } else if (messageType === ChatMessageType.IMAGE) { // For an image message, set the file path, width, height, and display name of the image file. + // For the image file path, `file://` is unnecessary. const filePath = "/data/.../image.jpg"; const width = 100; const height = 100; @@ -108,6 +109,7 @@ if (messageType === ChatMessageType.TXT) { }); } else if (messageType === ChatMessageType.FILE) { // Construct a file message. You need to set the file path and display name of the file. + // For the file path, `file://` is unnecessary. const filePath = "data/.../foo.zip"; const displayName = "study_data.zip"; msg = ChatMessage.createFileMessage(targetId, filePath, chatType, { @@ -129,6 +131,7 @@ if (messageType === ChatMessageType.TXT) { // Construct a video message, which includes the video file and thumbnail of the video. You need to set the file path, width, height, display name, and duration of the video file. // You also need to set the path of the thumbnail on the local device. // A video message contains two attachment files. + // For the video file path and thumbnail path, `file://` is unnecessary. const filePath = "data/.../foo.mp4"; const width = 100; const height = 100; @@ -144,6 +147,7 @@ if (messageType === ChatMessageType.TXT) { }); } else if (messageType === ChatMessageType.VOICE) { // Construct a voice message. You need to set the filepath, display name, and duration of the audio file. + // For the voice file path, `file://` is unnecessary. const filePath = "data/.../foo.wav"; const displayName = "bar.mp4"; const duration = 5; diff --git a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_web.md b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_web.md index 7604a6941d1..22b21ef782d 100644 --- a/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_web.md +++ b/en-US/markdown/agora-chat/Develop/Messages/Send and Receive Messages/agora_chat_send_receive_message_web.md @@ -177,6 +177,26 @@ When sending an attachment message, the SDK takes the following steps: 1. Uploads the attachment to the server and gets the information of the attachment file on the server 2. Sends the attachment message, which contains the basic information of the message, and the path to the attachment file on the server. +For the attachment messages, you can upload the attachment to your server, instead of the Agora server, before sending an attachment message. In this case, you need to set the `useOwnUploadFun` parameter in the `connection` class to `true` during SDK initialization. For example, to send an image message, you can call `sendPrivateUrlImg` to pass in the image URL after uploading the image attachment. + +```javascript +function sendPrivateUrlImg() { + let option = { + chatType: "singleChat", + // Message type. + type: "img", + // Image URL + url: "img url", + // Message sender: the user ID of the peer user for one-to-one chat; group ID for group chat; chat room ID for room chat. + to: "username", + }; + // Create an image message. + let msg = WebIM.message.create(option); + // Call the `send` method to send the image message. + conn.send(msg); +} +``` + For image and video messages, the SDK also automatically generates a thumbnail. When receiving an attachment message, the SDK takes the following steps: @@ -184,7 +204,6 @@ When receiving an attachment message, the SDK takes the following steps: - For image and video messages, the SDK automatically downloads the thumbnail of the image or video. To download the files, you need to call the `download` method. - For file messages, you need to call the `download` method to download the file. - #### Send a voice message Before sending a voice message, you should implement audio recording on the app level, which provides the URI and duration of the recorded audio file. @@ -299,29 +318,6 @@ Refer to the following code example to create and send an image message: }; ``` -#### Send a URL image message - -To send a URL image message, make sure you set `useOwnUploadFun` as `true`. - -```javascript - var sendPrivateUrlImg = function () { - - var option = { - chatType: 'singleChat', - // Set the message type. - type: "img", - // Set the URL address of the image file. - url: "img url", - // Set the usernmae of the message receiver. - to: "username", - }; - // Create an image message. - var msg = AC.message.create(option); - // Call send to send to image file. - conn.send(msg); - }; -``` - #### Send a video message Before sending a video message, you should implement video capturing on the app level, which provides the duration of the captured video file. diff --git a/en-US/markdown/agora-chat/Develop/agora_chat_set_up_webhooks.md b/en-US/markdown/agora-chat/Develop/agora_chat_set_up_webhooks.md index 707fcb251d1..7cc0a495754 100644 --- a/en-US/markdown/agora-chat/Develop/agora_chat_set_up_webhooks.md +++ b/en-US/markdown/agora-chat/Develop/agora_chat_set_up_webhooks.md @@ -112,10 +112,10 @@ The Chat server determines whether to send the message according to the HTTP res | :---------------- | :------------------------ |:------------------------ | | `callId` | String | The callback ID which is the unique identifier assigned to each callback. The callback ID is in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | | `timestamp` | Number | The Unix timestamp when the Chat server receives the message, in milliseconds. | -| `chat_type` | String | The chat type: | +| `chat_type` | String | The chat type: | | `group_id` | String | The group or chat room where the message included in the request is to be sent. This parameter is valid only for group and room chats. | | `from` | String | The user ID of the message sender. | -| `to` | String | The user ID of the message recipient. This parameter is valid only for one-to-one chats. | +| `to` | String | The message recipient.: | | `msg_id` | String | The ID of the message for which the callback request is sent. This ID is the same as the `msg_id` generated by the Chat server when the message is sent to the recipient. | | `payload` | JSON | The message content which matches the [content of the `payload` parameter in historical messages retrieved with the REST API](https://docs.agora.io/en/agora-chat/restful-api/message-management?platform=android#content-of-historical-messages). | | `securityVersion`| String | The security check version which is 1.0.0. | diff --git a/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_create.md b/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_create.md index f0acd63f30e..fbf1044e757 100644 --- a/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_create.md +++ b/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_create.md @@ -319,7 +319,9 @@ curl -X GET -H 'Accept: application/json' -H 'Authorization: Bearer If neither `pagesize` nor `pagenum` is specified, the server returns the top 500 groups in the descending order of when the user joined the groups. - #### Request header | Parameter | Type | Description | Required | diff --git a/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_member.md b/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_member.md index 4625d0ca7e8..0ef318bb0dd 100644 --- a/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_member.md +++ b/en-US/markdown/agora-chat/RESTful API Reference/Chat Group Management/agora_chat_restful_group_member.md @@ -452,8 +452,6 @@ curl -X DELETE -H 'Accept: application/json' -H 'Authorization: Bearer - `SUCCESS`: The push succeeds.
- `FAIL`: The push fails due to an error that is not caused by the server, like `bad device token`, indicating that the mobile device delivers an incorrect device token to the server and the server does not accept it.
- `ERROR`: The push exception occurs due to a server error, for example, connection timeout or read or write timeout.| +| `data.data` | Object | The push result data returned by the push service used by the push notification recipient. | +| `data.desc` | String | The description for the push failure. | For other fields and detailed descriptions, see [Common parameters](#param). @@ -96,7 +98,7 @@ curl -X POST 'http://XXXX/XXXX/XXXX/push/sync/test1' \ "pushMessage": { "title": "Agora push", "content": "Hello and welcome", - "sub_title": "Agora", + "sub_title": "Agora" } }' ``` @@ -128,7 +130,7 @@ curl -X POST 'http://XXXX/XXXX/XXXX/push/sync/test1' \ } ``` -2. The push fails because the push-related information (like the push token or certificate) is not bound with the device: +2. When a third-party push service is used, the push fails because the push-related information (like the push token or certificate) is not bound with the device: ```json { @@ -143,7 +145,7 @@ curl -X POST 'http://XXXX/XXXX/XXXX/push/sync/test1' \ } ``` -3. The push fails because the user ID of the push notification recipient does not exist: +3. When a third-party push service is used, the push fails because the user ID of the push notification recipient does not exist: ```json { "timestamp": 1689154534352, @@ -267,6 +269,7 @@ For the descriptions of path parameters, see [Common parameters](#param). | Parameter | Type | Description | Required | | :-------------- | :----- | :------- | :----------- | | `targets` | List | The targeting label names. You can either pass one label to send the push notification to all users under the label, or pass a maximum of five labels to send the push notification to the intersection of users under these labels. | Yes | +| `startDate` | String | The start date of the push task. The date format is yyyy-MM-dd HH:mm:ss, for example, 2024-01-01 12:00:00.
  • 1. The scheduled time must be one hour later than the curren time or 30 days from the current time.
  • 2. By default, the scheduled time is in the time zone where the server resides. If you want to use a time in a different time zone, you must calculate that time according to your time zone.
| No | | `strategy` | Number | The push strategy: | No | | `pushMessage` | JSON | The push message. See [Set push notifications](./agora_chat_restful_config_push_notification) for details. | Yes | @@ -346,6 +349,7 @@ For the descriptions of path parameters, see [Common parameters](#param). | Parameter | Type | Description | Required | | :-------------- | :----- | :------- | :----------- | +| `startDate` | String | The start date of the push task. The date format is yyyy-MM-dd HH:mm:ss, for example, 2024-01-01 12:00:00.
  • 1. The scheduled time must be one hour later than the curren time or 30 days from the current time.
  • 2. By default, the scheduled time is in the time zone where the server resides. If you want to use a time in a different time zone, you must calculate that time according to your time zone.
| No | | `strategy` | Number | The push strategy: | No | | `pushMessage` | JSON | The push message. See [Set push notifications](./agora_chat_restful_config_push_notification) for details. | Yes | diff --git a/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_message.md b/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_message.md index 8556b82fa72..4b15255df19 100644 --- a/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_message.md +++ b/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_message.md @@ -94,6 +94,7 @@ The request body is a JSON object, which contains the following parameters: | `to` | Array | An array of the usernames of the message recipient. For each request, you can send a message to a maximum of 600 users. Within one minute, you can send messages to a maximum of 6,000 users. | Yes | | `type` | String | The message type: | Yes | | `body` | JSON | The message content. For different message types, this parameter contains different fields. For details, see [Body of different message types](#body). | Yes | +| `roam_ignore_users` | List | No | Which users cannot obtain such message when they pull messages from the server. A maximum of 20 users can be passed in each time. | | `sync_device` | Bool | Whether to synchronize the message to the message sender. | No | | `routetype` | String | Whether the message is delivered only when the recipient(s) is/are online: | No | | `ext` | JSON | The extension filed of the message. It cannot be `null`.| No | @@ -192,7 +193,7 @@ If the returned HTTP status code is not `200`, the request fails. You can refer ```shell # Replace {YourToken} with the app token generated on your server - curl -X POST -i 'http://XXXX/XXXX/XXXX/messages/users' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer {YourToken}' -d '{"from": "user1","to": ["user2"],"type": "txt","body": {"msg": "testmessages"},"ext": {"em_ignore_notification": true}}' + curl -X POST -i 'http://XXXX/XXXX/XXXX/messages/users' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer {YourToken}' -d '{"from": "user1","to": ["user2"],"type": "txt","body": {"msg": "testmessages"},"roam_ignore_users": [],"ext": {"em_ignore_notification": true}}' ``` - Send a text message to the online user while synchronizing the message with the sender @@ -477,6 +478,7 @@ If the returned HTTP status code is not `200`, the request fails. You can refer "body": { "msg": "testmessages" }, + "roam_ignore_users": [], "ext": { "em_ignore_notification": true }, @@ -775,7 +777,7 @@ If the returned HTTP status code is not `200`, the request fails. You can refer ```shell # Replace {YourToken} with the app token generated on your server - curl -X POST -i 'http://XXXX/XXXX/XXXX/messages/chatrooms' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer {YourToken}' -d '{"from": "user1","to": ["185145305923585"],"type": "txt","body": {"msg": "testmessages"}}' + curl -X POST -i 'http://XXXX/XXXX/XXXX/messages/chatrooms' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: Bearer {YourToken}' -d '{"from": "user1","to": ["185145305923585"],"type": "txt","body": {"msg": "testmessages"},"roam_ignore_users": []}' ``` - Send an image message @@ -1304,6 +1306,8 @@ For the parameters and detailed descriptions, see [Common parameters](#param). | `Content-Type` | String | The content type. Pass `multipart/form-data` | Yes | | `Authorization` | String | The authentication token of the user or admin, in the format of `Bearer ${YourAppToken}`, where `Bearer` is a fixed character, followed by an English space, and then the obtained token value. | Yes | | `restrict-access` | Bool | Whether to restrict access to this file. | No | +| `thumbnail-height` | Number | The height of the image thumbnail, in pixels. This parameter is valid only if the size of the uploaded image exceeds 10 KB. If you leave this parameter empty, the height is 170 pixels by default. | No | +| `thumbnail-width` | Number| The width of the image thumbnail, in pixels. This parameter is valid only if the size of the uploaded image exceeds 10 KB. If you leave this parameter empty, the width is 170 pixels by default. | No | #### Request body @@ -1312,8 +1316,6 @@ The request body is in the form-data format and contains the following fields: | Field | Type | Description | Required | | :---- | :----- | :--------------------------------------------------------------------------------------------- | :------- | | `file` | String | The local path of the file to be uploaded. | Yes | -| `thumbnail-height` | Number | The height of the image thumbnail, in pixels. This parameter is valid only if the size of the uploaded image exceeds 10 KB. If you leave this parameter empty, the height is 170 pixels by default. | No | -| `thumbnail-width` | Number| The width of the image thumbnail, in pixels. This parameter is valid only if the size of the uploaded image exceeds 10 KB. If you leave this parameter empty, the width is 170 pixels by default. | No | ### HTTP response @@ -1337,7 +1339,7 @@ If the returned HTTP status code is not `200`, the request fails. You can refer ```shell # Replace {YourAppToken} with the app token generated on your server, and the path of file with the local full path where the file to be uploaded is located -curl -X POST 'https://XXXX/XXXX/XXXX/chatfiles' -H 'Authorization: Bearer ' -H 'Content-Type: multipart/form-data; boundary=---WebKitFormBoundary7MA4YWxkTrZu0gW' -H 'restrict-access: true' -F 'file="@/Users/test/9.2/agora/image/IMG_2953.JPG"' +curl -X POST 'https://XXXX/XXXX/XXXX/chatfiles' -H 'Authorization: Bearer ' -H 'Content-Type: multipart/form-data; boundary=---WebKitFormBoundary7MA4YWxkTrZu0gW' -H 'restrict-access: true' -H 'thumbnail-height: 180' -H 'thumbnail-width: 180' -F 'file="@/Users/test/9.2/agora/image/IMG_2953.JPG"' ``` #### Response example @@ -1931,7 +1933,7 @@ curl -X PUT -i 'https://XXXX/XXXX/XXXX/messages/rewrite/1235807318835202004' \ ## Recall a message -Once a message is sent, you can call this API to recall it. This API recalls a message that is saved both locally and on the server, whether it is a historical message, offline message or a roaming message on the server, or a message in the memory or local database of the message sender or recipient. +Once a message is sent, you can call this API to recall it. This API recalls a message that is saved both locally and on the server, whether it is a historical message, offline message or a roaming message on the server, or a message in the memory or local database of the message sender or recipient. If an attachment message, like an image, voice, video, or file message, is recalled, the attachment of the message is also deleted. The default time limit for recalling a message is two minutes. To adjust this limit, contact [support@agora.io](mailto:support@agora.io). @@ -1963,7 +1965,8 @@ For the parameters and detailed descriptions, see [Common parameters](#param). | `to` | String | Yes | The user, chat group, or chat room that receives the message to recall. You can specify a user ID, a chat group ID, or a chat room ID.
**Note**: If the message to recall no longer exists on the server, only the message on the recipient client is recalled. | | `chat_type` | String | Yes | The type of the chat where the message to recall is sent.
  • `chat`: An one-on-one chat.
  • `groupchat`: A chat group.
  • `chatroom`: A chat room.
| | `from` | String | No | The user who recalls the message. By default, the recaller is the app admin. You can also specify another user as the recaller. | -| `force` | bool | No | Whether to allow to recall messages beyond the storage time on the server. For details on the message storage duration on the server, see [Message storage duration](https://docs.agora.io/en/agora-chat/reference/limitations#message-storage-duration).
  • `true`: Yes. In this case, you can recall messages within the recall period or those beyond the storage time on the server. For the latter, this API recalls the messages locally saved by the recipient, but the local message on the sender side still exists. If the message sending time is between your recall duration and the storage duration on the server, the recall fails. For example, if the recall duration is 2 minutes and the storage time on the server is 7 days, you can recall a message sent within 2 minutes or one that was sent more than 7 days ago; if the message is sent 3 minutes ago, the recall will fail.
  • `false`: No. You cannot recall messages beyond the storage time on the server. If you use the default recall time of 2 minutes or a custom duration, the server can only recall the messages sent within the specified time, and those beyond this time cannot be recalled. For example, if you set the recall time to 3 minutes and the message is sent 4 minutes ago, the recall will fail.
| +| `sync_device` | Bool| No | Whether to synchronize the recall of a one-to-one message to all online devices of the message sender.
  • (Default) `true`: Yes
  • `false`: No
When `force` is set to `true`, to recall a message that expires, you need to set `from` to the sender of the message.
| +| `force` | Bool | No | Whether to allow to recall messages forcibly:
  • `true`: Yes. In this case, you can recall messages whether they expire. To recall the expired messages, you must set `force` to `true`.
  • (Default) `false`: No. In this case, you can only recall messages that still exist on the server within the recall duration.
| ### HTTP response @@ -2150,6 +2153,7 @@ POST https://{host}/{orgName}/{appName}/messages/users/import | `target` | String | The username of the message recipient. | Yes | | `type` | String | The message type:
  • `txt`: Text message
  • `img`: Image message
  • `audio`: Audio message
  • `video`: Video message
  • `file`: File message
  • `loc`: Location message
  • `cmd`: Command message
  • `custom`: Custom message
| Yes | | `body` | JSON | The message content. For different message types, this parameter contains different fields. For details, see [Body of different message types](#body). | Yes | +| `ext` | JSON | The message extension field that allows you to add custom information in the format of key-value pairs. | No | | `is_ack_read` | Bool | Whether to set the message as read.
  • `true`: Yes.
  • `false`: No.
| No | | `msg_timestamp` | Long | The timestamp for importing the messages, in milliseconds. If you leave this parameter empty, the server automatically sets it as the current time. | No | | `need_download` | Bool | Whether to download the attachment and upload it to the server:
  • `true`: Yes. In this case, you need to make sure that the attachment URL is publicly accessible.
  • `false`: (Default) No.
| No | @@ -2182,6 +2186,9 @@ If the request fails, refer to [Status codes](./agora_chat_status_code?platform= "body": { "msg": "import message." }, + "ext": { + "key1": "value1" + }, "from": "username1", "is_ack_read": true, "msg_timestamp": 1656906628428 @@ -2203,6 +2210,9 @@ If the request fails, refer to [Status codes](./agora_chat_status_code?platform= "height": 1920 } }, + "ext": { + "key1": "value1" + }, "from": "username1", "is_ack_read": true, "msg_timestamp": 1656906628428, @@ -2253,6 +2263,7 @@ POST https://{host}/{orgName}/{appName}/messages/chatgroups/import | `target` | String | The chat group ID that receives the message. | Yes | | `type` | String | The message type:
  • `txt`: Text message
  • `img`: Image message
  • `audio`: Audio message
  • `video`: Video message
  • `file`: File message
  • `loc`: Location message
  • `cmd`: Command message
  • `custom`: Custom message
| Yes | | `body` | JSON | The message content. For different message types, this parameter contains different fields. For details, see [Body of different message types](#body). | Yes | +| `ext` | JSON | The message extension field that allows you to add custom information in the format of key-value pairs. | No | | `is_ack_read` | Bool | Whether to set the message as read.
  • `true`: Yes.
  • `false`: No.
| No | | `msg_timestamp` | Long | The timestamp for importing the messages, in milliseconds. If you leave this parameter empty, the server automatically sets it as the current time. | No | | `need_download` | Bool | Whether to download the attachment and upload it to the server:
  • `true`: Yes. In this case, you need to make sure that the attachment URL is publicly accessible.
  • `false`: (Default) No.
| No | @@ -2285,6 +2296,9 @@ If the request fails, refer to [Status codes](./agora_chat_status_code?platform= "body": { "msg": "import message." }, + "ext": { + "key1": "value1" + }, "from": "username1", "is_ack_read": true, "msg_timestamp": 1656906628428 @@ -2306,6 +2320,9 @@ If the request fails, refer to [Status codes](./agora_chat_status_code?platform= "height": 1920 } }, + "ext": { + "key1": "value1" + }, "from": "username1", "is_ack_read": true, "msg_timestamp": 1656906628428, diff --git a/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_user_attributes.md b/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_user_attributes.md index 74646f63678..ac5ca57fcf7 100644 --- a/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_user_attributes.md +++ b/en-US/markdown/agora-chat/RESTful API Reference/agora_chat_restful_user_attributes.md @@ -73,14 +73,14 @@ For the parameters and detailed descriptions, see [Common parameters](#param). #### Request body -The request body is in the format of JSON String, and the length cannot exceed 4 KB. The request body contains the following fields: +The request body is in the format of JSON String. The request body contains the following fields: | Field | Type | Description | Required | | :------ | :----- | :----- | :------- | | `Key` | String | Attribute name | Yes | | `Value` | String | Attribute value | Yes | -When you call this RESTful API to set the user's nickname, avatar, contact information, email address, gender, signature, birthday and extension fields, you must pass in the following keys to make sure that the client can obtain the settings from the server: +Keys listed in the following table are used by default when user attributes are set on the client side, including the nickname, avatar URL, contact information, email address, gender, signature, birthday and extension fields. When you call this RESTful API to set these user attributes, you must pass in the following keys to make sure that the client can obtain the settings from the server. | Field | Type | Description | | :---------- | :----- | :----------------------------------------------------------- | @@ -88,7 +88,7 @@ When you call this RESTful API to set the user's nickname, avatar, contact infor | `avatarurl` | String | The user avatar URL, which can contain at most 256 characters. | | `phone` | String | The user's phone number, which can contain at most 32 characters. | | `mail` | String | The user's email address, which can contain at most 64 characters. | -| `gender` | Number | The user gender:
  • `1`:Male;
  • `2`:Female;
  • (Default) `0`: Unknown;
  • Other values are invalid.
| +| `gender` | Number | The user gender:
  • `1`:Male;
  • `2`:Female;
  • `0`: Unknown.
| | `sign` | String | The user's signature, which can contain at most 256 characters. | | `birth` | String | The user's birthday, which can contain at most 64 characters. | | `ext` | String | The extension fields. | diff --git a/en-US/markdown/agora-chat/Reference/agora_chat_error_android.md b/en-US/markdown/agora-chat/Reference/agora_chat_error_android.md index 61b55e7bfde..f6c2dc01b04 100644 --- a/en-US/markdown/agora-chat/Reference/agora_chat_error_android.md +++ b/en-US/markdown/agora-chat/Reference/agora_chat_error_android.md @@ -32,8 +32,10 @@ The error codes and error messages might be returned in the following ways: | 206 | `USER_LOGIN_ANOTHER_DEVICE` | The user has logged in on another device. If the multi-device service is not enabled, the user is forced to log out of the current device upon successful login on another device with the same account. | | 207 | `USER_REMOVED` | The user account is deleted on the [Agora Console](https://console.agora.io/). | | 209 | `PUSH_UPDATECONFIGS_FAILED` | Fails to update the push configurations. For example, a failure of changing the nickname displayed for message push or updating do-not-disturb settings. | -| 210 | `USER_PERMISSION_DENIED` | The user has no permission to perform this operation. For example, a user that is banned attempts to send a message. | -| 213 | `USER_BIND_ANOTHER_DEVICE` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario. This error code is deprecated. | +| 210 | `USER_PERMISSION_DENIED` | The user has no permission to perform this operation. For example, this error is reported in one of the following cases: 1. A user on the block list attempts to send a message. 2. A user tries to modify a message sent by another user. 3. A user tries to modify a custom group member attribute set by another user. 4. A user attempts to destroy a message thread (only the owner or administrators of the group where the thread resides can destroy the thread). | // Add the modification for Android, iOS, Unity, and Windows. +| 211 | `USER_BINDDEVICETOKEN_FAILED` | Fails to bind the push token to the device. | +| 212 | `USER_UNBIND_DEVICETOKEN_FAILED` | Fails to unbind the push token from the device. | +| 213 | `USER_BIND_ANOTHER_DEVICE` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario.| // Remove "This error code is deprecated." for Android, iOS, Unity, and Windows. | 214 | `USER_LOGIN_TOO_MANY_DEVICES` | The user has reached the maximum number of devices on which he or she can log in with the same user account. This error occurs on a device with auto login enabled in a multi-device login scenario if the app turns on the switch of login on another device never kicking the user off on a current login device when the maximum number of login devices is exceeded. For example, a user can log in on at most four devices. At first, the user stays logged in on four devices, A (with auto login enabled), B, C, D. Then, the user gets logged out on device A due to network disruption and logs in on device E manually. After the network is available, auto login is performed on device A and fails due to the limit of login devices, triggering this error. | | 215 | `USER_MUTED` | The user is muted and not allowed to send messages in a chat group or chat room. | | 216 | `USER_KICKED_BY_CHANGE_PASSWORD` | The user has changed the login password. Once the login password is changed, the current login session ends and the user must log in again with the new password. | diff --git a/en-US/markdown/agora-chat/Reference/agora_chat_error_csharp.md b/en-US/markdown/agora-chat/Reference/agora_chat_error_csharp.md index 5a3c1381475..5eca27b66d7 100644 --- a/en-US/markdown/agora-chat/Reference/agora_chat_error_csharp.md +++ b/en-US/markdown/agora-chat/Reference/agora_chat_error_csharp.md @@ -51,7 +51,7 @@ SDKClient.Instance.Login(username, passwd, | 206 | `USER_LOGIN_ANOTHER_DEVICE` | The user has logged in on another device. If the multi-device service is not enabled, the user is forced to log out of the current device upon successful login on another device with the same account. | | 207 | `USER_REMOVED` | The user account is deleted on the [Agora Console](https://console.agora.io/). | | 210 | `USER_PERMISSION_DENIED` | The user has no permission to perform this operation. For example, a user that is banned attempts to send a message. | -| 213 | `USER_BIND_ANOTHER_DEVICE` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario. This error code is deprecated.| +| 213 | `USER_BIND_ANOTHER_DEVICE` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario.| | 214 | `USER_LOGIN_TOO_MANY_DEVICES` | The user has reached the maximum number of devices on which he or she can log in with the same user account. This error occurs on a device with auto login enabled in a multi-device login scenario if the app turns on the switch of login on another device never kicking the user off on a current login device when the maximum number of login devices is exceeded. For example, a user can log in on at most four devices. At first, the user stays logged in on four devices, A (with auto login enabled), B, C, D. Then, the user gets logged out on device A due to network disruption and logs in on device E manually. After the network is available, auto login is performed on device A and fails due to the limit of login devices, triggering this error. | | 215 | `USER_MUTED` | The user is muted and not allowed to send messages in a chat group or chat room. | | 216 | `USER_KICKED_BY_CHANGE_PASSWORD` | The user has changed the login password. Once the login password is changed, the current login session ends and the user must log in again with the new password. | diff --git a/en-US/markdown/agora-chat/Reference/agora_chat_error_ios.md b/en-US/markdown/agora-chat/Reference/agora_chat_error_ios.md index b8ad775df96..a595ddb214a 100644 --- a/en-US/markdown/agora-chat/Reference/agora_chat_error_ios.md +++ b/en-US/markdown/agora-chat/Reference/agora_chat_error_ios.md @@ -30,7 +30,9 @@ During the run time of the Agora Chat SDK, if the method call succeeds, the SDK | 207 | `AgoraChatErrorUserRemoved` | The user account is deleted on the [Agora Console](https://console.agora.io/).| | 209 | `AgoraChatErrorUpdateApnsConfigsFailed` | Fails to update the push configurations. For example, a failure of changing the nickname displayed for message push or updating do-not-disturb settings. | | 210 | `AgoraChatErrorUserPermissionDenied` | The user has no permission to perform this operation. For example, a user that is banned attempts to send a message. | -| 213 | `AgoraChatErrorUserBindAnotherDevice` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario. This error code is deprecated. | +| 211 | `AgoraChatErrorUserBindDeviceTokenFailed` | Fails to bind the push token to the device. | +| 212 | `AgoraChatErrorUserUnbindDeviceTokenFailed` | Fails to unbind the push token from the device. | +| 213 | `AgoraChatErrorUserBindAnotherDevice` | The user has logged in to another device. This error occurs when a user has logged in on one device and try to log in on another one with the same account, if the app is configured to persist the login state on the current device while preventing the login on another device in a single-device login scenario.| | 214 | `AgoraChatErrorUserLoginTooManyDevices` | The user has reached the maximum number of devices on which he or she can log in with the same user account. This error occurs on a device with auto login enabled in a multi-device login scenario if the app turns on the switch of login on another device never kicking the user off on a current login device when the maximum number of login devices is exceeded. For example, a user can log in on at most four devices. At first, the user stays logged in on four devices, A (with auto login enabled), B, C, D. Then, the user gets logged out on device A due to network disruption and logs in on device E manually. After the network is available, auto login is performed on device A and fails due to the limit of login devices, triggering this error. | | 215 | `AgoraChatErrorUserMuted` | The user is muted and not allowed to send messages in a chat group or chat room. | | 216 | `AgoraChatErrorUserKickedByChangePassword` | The user has changed the login password. Once the login password is changed, the current login session ends and the user must log in again with the new password. | diff --git a/en-US/markdown/agora-chat/Reference/agora_chat_error_web.md b/en-US/markdown/agora-chat/Reference/agora_chat_error_web.md index d2e8fc2e8a3..b8e07ed2067 100644 --- a/en-US/markdown/agora-chat/Reference/agora_chat_error_web.md +++ b/en-US/markdown/agora-chat/Reference/agora_chat_error_web.md @@ -50,7 +50,7 @@ During the run time of the Agora Chat SDK, the error codes and error messages mi | 506 | `SERVICE_NOT_ALLOW_MESSAGING` | The user is not on the allow list of a group or chat room. This error occurs when a user that is not on the allow list attempts to send a message in a chat group or chat room if all members of the group or chat room are muted. | | 507 | `SERVICE_NOT_ALLOW_MESSAGING_MUTE` | The user is muted and not allowed to send messages in a chat group or chat room. | | 508 | `MESSAGE_MODERATION_BLOCKED` | The message moderation result provided by the third-party content moderation service is `Rejected`. | -| 510 | `MESSAGE_WEBSOCKET_DISCONNECTED` | Fails to send the message due to the network disconnection. | +| 510 | `MESSAGE_WEBSOCKET_DISCONNECTED` | Fails to send the message due to reasons like the network disconnection or reconnection failure. | | 511 | `MESSAGE_SIZE_LIMIT` | The body of the message to send exceeds the upper limit. | | 601 | `GROUP_ALREADY_JOINED` | The user is already in this chat group. For example, the error occurs when a user attempts to join a chat group that he or she is already in. | | 602 | `GROUP_NOT_JOINED` | The user hasn't joined this chat group. The error occurs when a user attempts to send a message or perform operations in a chat group that he or she is not in. | diff --git a/en-US/markdown/agora-chat/Reference/agora_chat_receive_webhook.md b/en-US/markdown/agora-chat/Reference/agora_chat_receive_webhook.md index cd4f8fe4ec8..5c47259719e 100644 --- a/en-US/markdown/agora-chat/Reference/agora_chat_receive_webhook.md +++ b/en-US/markdown/agora-chat/Reference/agora_chat_receive_webhook.md @@ -19,7 +19,7 @@ When a user logs in to the Agora Chat app, the Agora Chat server sends a callbac ```json { - "callId":"XXXX#XXXXe393c568-5ae5-4a0e-8a2c-008b52b49eed", + "callId":"XXXX#XXXX_e393c568-5ae5-4a0e-8a2c-008b52b49eed", "reason":"login", "security":"XXXXae2eXXXXced298883a0cf06d41b9", "os":"ios", @@ -53,7 +53,7 @@ When a user logs out of the Agora Chat app, the Agora Chat server sends a callba ```json { - "callId":"XXXX#XXXX25b54a81-1376-4669-bb3d-178339a8f11b", + "callId":"XXXX#XXXX_25b54a81-1376-4669-bb3d-178339a8f11b", "reason":"logout", "security":"XXXXd77eXXXXf26801627fdaadca987e", "os":"ios", @@ -87,7 +87,7 @@ When a user is forced by the developer to go offline on the device or due to bei ```json { - "callId":"XXXX#XXXX260ae3eb-ba31-4f01-9a62-8b3b05f3a16c", + "callId":"XXXX#XXXX_260ae3eb-ba31-4f01-9a62-8b3b05f3a16c", "reason":"replaced", "security":"XXXX00b1XXXX4fe76dbfdc664cbaa76b", "os":"ios","ip":"223.71.97.198:52709", @@ -123,7 +123,7 @@ When a user sends a message in a one-to-one chat, chat group, or chat room of th ```json { - "callId":"{appkey}_{uuid}", + "callId":"{appkey}_{ID of the sent message}", "eventType":"chat_offline", "timestamp":1600060847294, "chat_type":"groupchat", @@ -141,7 +141,7 @@ When a user sends a message in a one-to-one chat, chat group, or chat room of th | Field | Data Type | Description | | -- | -- | -- | -| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | +| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{ID of the sent message}`. | | `eventType` | String | The message type of the callback.
  • `chat`: Uplink messages. The messages that are about to be sent by the Agora Chat server to end devices.
  • `chat_offline`: Offline messages. The messages that are not sent by the Agora Chat server as end users are offline.
| | `timestamp` | Long | The Unix timestamp when the Agora Chat server receives the callback event, in milliseconds. | | `chat_type` | String | The type of chat.
  • `chat`: One-to-one chats.
  • `groupchat`: Chat groups and chat rooms.
| @@ -396,7 +396,7 @@ When a user recalls a message in a one-to-one chat, chat group, or chat room of | Field | Data Type | Description | | --- | --- | --- | -| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | +| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{ID of the recall callback event message}`. | | `eventType` | String | The message type of the callback.
  • `chat`: Uplink messages. The messages that are about to be sent by the Agora Chat server to end devices.
  • `chat_offline`: Offline messages. The messages that are not sent by the Agora Chat server as the end user is offline.
| | `timestamp` | Long | The Unix timestamp when the Agora Chat server receives the callback event, in milliseconds. | | `chat_type` | String | The type of chat.
  • `chat`: One-to-one chats.
  • `groupchat`: Chat groups and chat rooms.
| @@ -418,7 +418,7 @@ When a user performs operations on a chat group or chat room in the Agora Chat a ```json { "chat_type": "muc", - "callId": "XXXX#XXXX", + "callId": "{appKey}_{message ID of the operation event of the chat group or chat room}", "security": "XXXX", "payload":{ // The details of the callback. @@ -437,7 +437,7 @@ When a user performs operations on a chat group or chat room in the Agora Chat a | Field | Data Type | Description | | --- | --- | --- | | `chat_type` | String | The type of the event. `muc` indicates a chat group or a chat room. | -| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | +| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{message ID of the operation event of the chat group or chat room}`. | | `eventType` | String | The message type of the callback.
  • `chat`: Uplink messages. The messages that are about to be sent by the Agora Chat server to end devices.
  • `chat_offline`: Offline messages. The messages that are not sent by the Agora Chat server as the end user is offline.
| | `timestamp` | Long | The Unix timestamp when the Agora Chat server receives the callback event, in milliseconds. | | `group_id` | String | The ID of the chat group or chat room where the message resides. This field only exists if `chat_type` is set to `groupchat`. | @@ -1196,7 +1196,7 @@ When a user performs operations on the contacts in the Agora Chat app, the Agora | Field | Data Type | Description | | --- | --- | --- | | `chat_type` | String | The type of the event. `roster` indicates an event occurred in user contacts. | -| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | +| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{message ID of the contact operation event}`. | | `eventType` | String | The message type of the callback.
  • `chat`: Uplink messages. The messages that are about to be sent by the Agora Chat server to end devices.
  • `chat_offline`: Offline messages. The messages that are not sent by the Agora Chat server as the end user is offline.
| | `timestamp` | Long | The Unix timestamp when the Agora Chat server receives the callback event, in milliseconds. | | `from` | String | The user who operates the contact. | @@ -1343,7 +1343,7 @@ When a user sends read receipt for a message in a one-to-one chat, the Agora Cha | Field | Data Type | Description | | :---------- | :------- | :----------------------------------------------------------- | | `chat_type` | String | The event type. The value is `read_ack`, indicating read receipts. | -| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{uuid}`, where the value of `uuid` is randomly generated. | +| `callId` | String | The ID of the callback. The unique identifier assigned to each callback, in the format of `{appKey}_{message ID of the read receipt}`. | | `security` | String | The signature in the callback request used to confirm whether this callback is sent from the Agora Chat server. The signature is the MD5 hash of the `{callId} + {secret} + {timestamp}` string, where the value of `secret` can be found on [Agora Console](https://console.agora.io/).| | `payload` | Object | The structure of the callback event that contains the following fields:
  • `ext`: The message extension field.
  • `ack_message_id`: The message ID of the receipt callback.
  • `bodies`: The message body.
| | `host` | String | The domain name assigned by the Agora Chat service to access RESTful APIs. |