toId:联系人传 userId,群聊传 roomId。subtype=1 时,@所有人的 text 在文档规则中写为 0,在示例中写为空字符串;两者不一致,使用前请确认服务端要求。curl --location 'https://console.wecomapi.com/wecom/finder/api' \
--header 'WECOM-TOKEN: ' \
--header 'Content-Type: application/json' \
--data '{
"method": "/msg/sendHyperText",
"params": {
"guid": "",
"content": [
{
"subtype": 1,
"text": "16888500000001"
},
{
"subtype": 2,
"text": "[微笑][憨笑]"
},
{
"subtype": 0,
"text": "这是一条富文本测试消息"
}
],
"toId": "{{toId}}"
}
}'{
"code": 0,
"msg": "成功",
"data": {
"isSendSuccess": 1,
"msgServerId": 1011353,
"msgType": 2,
"msgUniqueIdentifier": "901efcada57ff16a469411b3e7f1b009",
"seq": 7104740,
"timestamp": 1778132182
}
}