go开发之个人微信号机器人开发

简要描述:

  • 下载消息中的文件

请求URL:

请求方式:

  • POST

请求头Headers:

  • Content-Type:application/json
  • Authorization:login接口返回

参数:

参数名 必选 类型 说明
wId string 登录实例标识 包含此参数 所有参数都是从消息回调中取)
msgId long 消息id
content string 收到的消息的xml数据

返回数据:

参数名 类型 说明
code string 1000成功,1001失败
msg string 反馈信息

请求参数示例

language- 复制代码
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
   <span style="color:#990055">"wId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"0000016f-a3f4-7ac2-0001-4686486bb6c6"</span><span style="color:#999999">,</span>
   <span style="color:#990055">"msgId"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#990055">1102684150</span><span style="color:#999999">,</span>
   <span style="color:#990055">"content"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"<?xml version=\"1.0\"?><msg><appmsg appid=\"wx6618f1cfc6c132f8\" sdkver=\"0\"><title>下载文件.txt</title><des /><action>view</action><type>6</type><showtype>0</showtype><content /><url /><dataurl /><lowurl /><lowdataurl /><recorditem><![CDATA[]]></recorditem><thumburl /><messageaction /><extinfo /><sourceusername /><sourcedisplayname /><commenturl /><appattach><totallen>6</totallen><attachid>@cdn_304e02010004473045020100020466883f5202032f55f90204260260b402045e1db470042036626464393436656537643431613836623065383665373034396538646566630204010400050201000400_17dd9d048f84c77db909b2161d6dbb09_1</attachid><emoticonmd5></emoticonmd5><fileext>txt</fileext><cdnattachurl>304e02010004473045020100020466883f5202032f55f90204260260b402045e1db470042036626464393436656537643431613836623065383665373034396538646566630204010400050201000400</cdnattachurl><aeskey>17dd9d048f84c77db909b2161d6dbb09</aeskey><encryver>1</encryver></appattach><weappinfo><pagepath /><username /><appid /><appservicetype>0</appservicetype></weappinfo><websearch /><md5>8c8fa3529ee34d4e69a0baafb7069da3</md5></appmsg><fromusername>wxid_lr6j4nononb921</fromusername><scene>0</scene><appinfo><version>7</version><appname>微信电脑版</appname></appinfo><commenturl /></msg>"</span>
<span style="color:#999999">}</span></code></span></span></span></span>

成功返回示例

language- 复制代码
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
    <span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"成功"</span><span style="color:#999999">,</span>
    <span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1000"</span><span style="color:#999999">,</span>
    <span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#999999">{</span>
        <span style="color:#990055">"url"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"下载文件.txt"</span>
    <span style="color:#999999">}</span>
<span style="color:#999999">}</span></code></span></span></span></span>

错误返回示例

language- 复制代码
<span style="color:#333333"><span style="background-color:#ffffff"><span style="background-color:#f7f8f9"><span style="color:black"><code><span style="color:#999999">{</span>
    <span style="color:#990055">"message"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"失败"</span><span style="color:#999999">,</span>
    <span style="color:#990055">"code"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#669900">"1001"</span><span style="color:#999999">,</span>
    <span style="color:#990055">"data"</span><span style="background-color:rgba(255, 255, 255, 0.5)"><span style="color:#9a6e3a">:</span></span> <span style="color:#0077aa">null</span>
<span style="color:#999999">}</span></code></span></span></span></span>

测试地址:https://wkteam.cn/

相关推荐
亚图跨际1 分钟前
Python和R荧光分光光度法
开发语言·python·r语言·荧光分光光度法
Rverdoser9 分钟前
RabbitMQ的基本概念和入门
开发语言·后端·ruby
dj244294570713 分钟前
JAVA中的Lamda表达式
java·开发语言
流星白龙43 分钟前
【C++习题】10.反转字符串中的单词 lll
开发语言·c++
尘浮生1 小时前
Java项目实战II基于微信小程序的校运会管理系统(开发文档+数据库+源码)
java·开发语言·数据库·微信小程序·小程序·maven·intellij-idea
MessiGo1 小时前
Python 爬虫 (1)基础 | 基础操作
开发语言·python
Tech Synapse1 小时前
Java根据前端返回的字段名进行查询数据的方法
java·开发语言·后端
.生产的驴1 小时前
SpringCloud OpenFeign用户转发在请求头中添加用户信息 微服务内部调用
spring boot·后端·spring·spring cloud·微服务·架构
乌啼霜满天2491 小时前
JDBC编程---Java
java·开发语言·sql
微信-since811921 小时前
[ruby on rails] 安装docker
后端·docker·ruby on rails