Update a community channel message
Update the content of a sent community channel message. The message type cannot be changed. For example, if the original message is a text message, the new content must also be a text message.
Request method
POST: https://Base URL/v4/community-channel/message/update
Rate limit: 100 requests per minute
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The community channel ID that the message belongs to. |
subchannelId | String | No | The subchannel ID that the message belongs to. Required unless the message is in the default subchannel (RCDefault). |
fromUserId | String | Yes | The sender's user ID. |
messageUID | String | Yes | The message UID. Obtainable via the message routing service. See Message routing. |
content | String | Yes | The updated message content. Maximum 128 KB per message. The message type cannot be changed.
|
Request example
HTTP
POST /v4/community-channel/message/update HTTP/1.1
Host: api-cn.ronghub.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307338a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelId": "BWSZNmXBD",
"subchannelId": "channel1",
"fromUserId": "2191",
"messageUID": "C16R-VBGG-1IE5-SD0C",
"content": "{\"content\":\"hello\",\"extra\":\"helloExtra\"}"
}
Response
The response body contains a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0}