发送appmsg消息
POST
/gewe/v2/api/message/postAppMsg注意
本接口可用于发送所有包含
请求参数
Header 参数
X-GEWE-TOKEN
string
必需
示例值:
{{gewe-token}}
Body 参数application/json
appId
string
设备ID
toWxid
string
好友/群的ID
appmsg
string
必需
回调消息中的appmsg节点内容
示例
{
"appId": "{{appid}}",
"toWxid": "34757816141@chatroom",
"appmsg": "<appmsg appid=\"\" sdkver=\"0\">\n\t\t<title>一审宣判!蔡鄂生被判死缓</title>\n\t\t<des />\n\t\t<action />\n\t\t<type>5</type>\n\t\t<showtype>0</showtype>\n\t\t<soundtype>0</soundtype>\n\t\t<mediatagname />\n\t\t<messageext />\n\t\t<messageaction />\n\t\t<content />\n\t\t<contentattr>0</contentattr>\n\t\t<url>http://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2666774093&idx=1&sn=aa405094dd00034d004f6e8287f86e9b&chksm=bcc9d903635a9c284591edda1f027c467245d922d7d66c32d3cd2c6af1c969a7ea0896aa7639&scene=0&xtrack=1#rd</url>\n\t\t<lowurl />\n\t\t<dataurl />\n\t\t<lowdataurl />\n\t\t<appattach>\n\t\t\t<totallen>0</totallen>\n\t\t\t<attachid />\n\t\t\t<emoticonmd5 />\n\t\t\t<fileext />\n\t\t\t<cdnthumburl>3057020100044b304902010002048399cc8402032f57ed02041388e6720204658e922d042462666538346165322d303035382d343262322d616538322d3337306231346630323534360204051408030201000405004c53d900</cdnthumburl>\n\t\t\t<cdnthumbmd5>ea3d5e8d4059cb4db0a3c39c789f2d6f</cdnthumbmd5>\n\t\t\t<cdnthumblength>93065</cdnthumblength>\n\t\t\t<cdnthumbwidth>1080</cdnthumbwidth>\n\t\t\t<cdnthumbheight>459</cdnthumbheight>\n\t\t\t<cdnthumbaeskey>849df42ab37c8cadb324fe94ba46d76e</cdnthumbaeskey>\n\t\t\t<aeskey>849df42ab37c8cadb324fe94ba46d76e</aeskey>\n\t\t\t<encryver>0</encryver>\n\t\t</appattach>\n\t\t<extinfo />\n\t\t<sourceusername>gh_363b924965e9</sourceusername>\n\t\t<sourcedisplayname>人民日报</sourcedisplayname>\n\t\t<thumburl>https://mmbiz.qpic.cn/sz_mmbiz_jpg/xrFYciaHL08DCJtwQefqrH8JcohbOHhTpyCPab8IgDibkTv3Pspicjw8TRHnoic2tmiafBtUHg7ObZznpWocwkCib6Tw/640?wxtype=jpeg&wxfrom=0</thumburl>\n\t\t<md5 />\n\t\t<statextstr />\n\t\t<mmreadershare>\n\t\t\t<itemshowtype>0</itemshowtype>\n\t\t</mmreadershare>\n\t</appmsg>"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
ret
integer
必需
msg
string
必需
data
object
必需
toWxid
string
接收人的wxid
createTime
integer
发送时间
msgId
integer
消息ID
newMsgId
integer
消息ID
type
integer
消息类型
示例
{
"ret": 200,
"msg": "操作成功",
"data": {
"toWxid": "34757816141@chatroom",
"createTime": 1703842453,
"msgId": 769523712,
"newMsgId": 3090682956820882400,
"type": 0
}
}
最后修改时间: 7 个月前