Skip to content

编辑消息

请求URL

https://chat-go.jwzhd.com/open-apis/v1/bot/edit?token=016ec8e4d17a4fbda3ccb0e99b44aca0

请求头

bash
Content-Type: "application/json"

请求参数

字段类型是否必填说明
msgIdstring消息ID
recvIdstring接收消息对象ID,用户: userId 群: groupId
需与原消息保持一致
recvTypestring接收对象类型,用户: user 群: group
需与原消息保持一致
contentTypestring消息类型,取值如下
text/image/file/markdown
contentContent对象消息对象, 具体值见发送消息

经实际测试,contentType 取值为 imagefile 时不会生效。

另外,编辑消息功能在云湖的官方客户端里,也仅支持编辑为文本MarkdownHtml

响应内容

字段类型说明
codeint响应代码
messagestring响应信息,包括异常信息
dataObject返回数据

完整示例

bash
curl --location 'https://chat-go.jwzhd.com/open-apis/v1/bot/edit?token=016ec8e4d17a4fbda3ccb0e99b44aca0' \
--header 'Content-Type: application/json' \
--data '{
    "msgId": "a54ec67c089044dfa4241b9dd0a57f8d",
    "recvId": "307149245",
    "recvType": "group",
    "contentType": "text",
    "content": {
        "text": "这里是消息内容"
    }
}'

body

json
{
    "msgId": "a54ec67c089044dfa4241b9dd0a57f8d",
    "recvId": "307149245",
    "recvType": "group",
    "contentType": "text",
    "content": {
        "text": "这里是消息内容"
    }
}

响应

json
{
    "code": 1,
    "data": {
        "successCount": 1
    },
    "msg": "success"
}