转发图片
POST
/gewe/v2/api/message/forwardImage注意
若通过发送图片消息获取cdn信息后可替换xml中的aeskey、cdnthumbaeskey、cdnthumburl、cdnmidimgurl、length、md5等参数来进行转发
请求参数
Header 参数
X-GEWE-TOKEN
string
必需
示例值:
{{gewe-token}}
Body 参数application/json
appId
string
设备ID
toWxid
string
好友/群的ID
xml
string
文件消息的xml
示例
{
"appId": "{{appid}}",
"toWxid": "34757816141@chatroom",
"xml": "<?xml version=\"1.0\"?>\n<msg>\n\t<img aeskey=\"294774c8ac2ca8f8114e4d58d2ba78a5\" encryver=\"1\" cdnthumbaeskey=\"294774c8ac2ca8f8114e4d58d2ba78a5\" cdnthumburl=\"3057020100044b304902010002043904752002032f7d6d02046bb5bade020465937656042436626431373937632d613430642d346137662d626230352d3832613335353935333130630204051818020201000405004c543d00\" cdnthumblength=\"2253\" cdnthumbheight=\"120\" cdnthumbwidth=\"111\" cdnmidheight=\"0\" cdnmidwidth=\"0\" cdnhdheight=\"0\" cdnhdwidth=\"0\" cdnmidimgurl=\"3057020100044b304902010002043904752002032f7d6d02046bb5bade020465937656042436626431373937632d613430642d346137662d626230352d3832613335353935333130630204051818020201000405004c543d00\" length=\"4061\" md5=\"799ee4beed51720525232aef6a0d2ec4\" />\n\t<platform_signature></platform_signature>\n\t<imgdatahash></imgdatahash>\n</msg>"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
ret
integer
必需
msg
string
必需
data
object
必需
toWxid
string
接收人的wxid
createTime
integer
发送时间
msgId
integer
消息ID
newMsgId
integer
消息ID
type
null
消息类型
aesKey
string
必需
cdn相关的aeskey
fileId
string
必需
cdn相关的fileid
length
integer
图片文件大小
width
integer
图片宽度
height
integer
图片高度
md5
string
图片md5
示例
{
"ret": 200,
"msg": "操作成功",
"data": {
"toWxid": "34757816141@chatroom",
"createTime": 0,
"msgId": 769533749,
"newMsgId": 7003061792458481000,
"type": null,
"aesKey": "294774c8ac2ca8f8114e4d58d2ba78a5",
"fileId": "3057020100044b304902010002043904752002032f7d6d02046bb5bade020465937656042436626431373937632d613430642d346137662d626230352d3832613335353935333130630204051818020201000405004c543d00",
"length": null,
"width": null,
"height": null,
"md5": null
}
}
最后修改时间: 7 个月前