vworkApi


聊天消息

<p><strong>简要描述:</strong></p> <ul> <li>监听聊天消息【需要自己开一个HTTP服务,DLL会主动请求你,并把消息内容推送到约定接口】</li> </ul> <p><strong>请求URL:</strong></p> <ul> <li><code>http://127.0.0.1:9000/msg</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST</li> </ul> <p><strong>消息示例:</strong></p> <pre><code class="language-json">{ &amp;quot;type&amp;quot;: 100, // 推送类型,固定为100 &amp;quot;msg_type&amp;quot;: 2, //消息类型 &amp;quot;msg_id&amp;quot;: &amp;quot;10018000&amp;quot;, //消息ID &amp;quot;user_id&amp;quot;: &amp;quot;7881300000&amp;quot;, //聊天用户ID/群ID, &amp;quot;waiter_id&amp;quot;: &amp;quot;2580800000&amp;quot;, //客服ID &amp;quot;at_list&amp;quot;: [&amp;quot;7881300001&amp;quot;, &amp;quot;7881300002&amp;quot;], // 群消息艾特人列表,艾特所有人就是【notify@all】 &amp;quot;content&amp;quot;: &amp;quot;不同类型的消息,该字段的值也不相同,具体看下方文档&amp;quot;, //消息内容【可变字段】 &amp;quot;sender&amp;quot;: &amp;quot;7881300003&amp;quot;, //如果是群消息,该参数为发送者的用户ID,否则为空 &amp;quot;time_stamp&amp;quot;: 1682944354, //发送时间 &amp;quot;is_self_msg&amp;quot;: 1, //是否是自己发送的消息 0:别人发来的 1:自己发的 &amp;quot;is_pc_msg&amp;quot;: 1, //是否是PC端发送的消息(仅用于判断自己发送的消息,别人发送的都是0) 0:否 1:是 &amp;quot;self_user_id&amp;quot;: &amp;quot;168888888888&amp;quot;, //自己的用户ID &amp;quot;port&amp;quot;: 8989 //DLL的端口号 }</code></pre> <p><strong>消息类型说明【msg_type】:</strong></p> <table> <thead> <tr> <th style="text-align: center;">消息类型</th> <th style="text-align: center;">说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: center;">2</td> <td style="text-align: center;">文本消息</td> </tr> <tr> <td style="text-align: center;">14</td> <td style="text-align: center;">图片消息</td> </tr> <tr> <td style="text-align: center;">29</td> <td style="text-align: center;">GIF消息</td> </tr> <tr> <td style="text-align: center;">15</td> <td style="text-align: center;">文件消息</td> </tr> <tr> <td style="text-align: center;">23</td> <td style="text-align: center;">视频消息</td> </tr> <tr> <td style="text-align: center;">41</td> <td style="text-align: center;">名片消息</td> </tr> <tr> <td style="text-align: center;">78</td> <td style="text-align: center;">小程序消息</td> </tr> <tr> <td style="text-align: center;">141</td> <td style="text-align: center;">视频号消息</td> </tr> <tr> <td style="text-align: center;">13</td> <td style="text-align: center;">卡片链接消息</td> </tr> <tr> <td style="text-align: center;">6</td> <td style="text-align: center;">位置消息</td> </tr> <tr> <td style="text-align: center;">16</td> <td style="text-align: center;">语音消息</td> </tr> <tr> <td style="text-align: center;">4</td> <td style="text-align: center;">合并消息</td> </tr> <tr> <td style="text-align: center;">其他不常见的消息可根据 msg_type 自行分析</td> <td style="text-align: center;">未知消息</td> </tr> </tbody> </table> <p><strong>【2】文本消息的content:</strong></p> <pre><code class="language-json">&amp;quot;就是字符串&amp;quot;</code></pre> <p><strong>【14】图片消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;cdn_key&amp;quot;: &amp;quot;30520201000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;aes_key&amp;quot;: &amp;quot;ba8221xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;url&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;auth_key&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;md5&amp;quot;: &amp;quot;e12f93xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;size&amp;quot;: 230192, //图片大小 &amp;quot;img_type&amp;quot;: 2, //1=原图 2=高清图 3=缩略图 &amp;quot;source_type&amp;quot;: 2 //资源来源 1:个微 2:企微 }</code></pre> <p><strong>【29】GIF消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;source_type&amp;quot;: 2, //资源来源 1:个微 2:企微 &amp;quot;url&amp;quot;: &amp;quot;http://p.qpic.cn/pic_wework/xxx/xxx/0&amp;quot; }</code></pre> <p><strong>【15】文件消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;cdn_key&amp;quot;: &amp;quot;30520201000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;aes_key&amp;quot;: &amp;quot;ba8221xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;url&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;auth_key&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;md5&amp;quot;: &amp;quot;e12f93xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;size&amp;quot;: 20308, //文件大小 &amp;quot;file_name&amp;quot;: &amp;quot;xxx.exe&amp;quot;, //文件名 &amp;quot;source_type&amp;quot;: 2 //资源来源 1:个微 2:企微 }</code></pre> <p><strong>【23】视频消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;cdn_key&amp;quot;: &amp;quot;30520201000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;aes_key&amp;quot;: &amp;quot;ba8221xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;url&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;auth_key&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;md5&amp;quot;: &amp;quot;e12f93xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;size&amp;quot;: 887690, //视频大小 &amp;quot;source_type&amp;quot;: 2 //资源来源 1:个微 2:企微 }</code></pre> <p><strong>【41】名片消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;corp_id&amp;quot;: &amp;quot;197xxx&amp;quot;, //公司ID &amp;quot;user_id&amp;quot;: &amp;quot;168xxx&amp;quot;, //用户ID &amp;quot;avatar_url&amp;quot;: &amp;quot;https://thirdwx.qlogo.cn/mmopen/vi_32/xxx/0&amp;quot;, //头像地址 &amp;quot;nick_name&amp;quot;: &amp;quot;三水君&amp;quot;, //昵称 &amp;quot;title&amp;quot;: &amp;quot;超人俱乐部&amp;quot; //卡片标题 }</code></pre> <p><strong>【78】小程序消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;app_id&amp;quot;: &amp;quot;wx32540bd863b27570&amp;quot;, //小程序ID &amp;quot;app_name&amp;quot;: &amp;quot;拼夕夕&amp;quot;, //小程序名称 &amp;quot;title&amp;quot;: &amp;quot;快帮我砍一刀~&amp;quot;, //标题 &amp;quot;desc&amp;quot;: &amp;quot;拼单尽享优惠&amp;quot;, //描述信息 &amp;quot;wechat_id&amp;quot;: &amp;quot;gh_0e7477744313@app&amp;quot;, //微信ID &amp;quot;page_path&amp;quot;: &amp;quot;pages/index/index.html?xxx&amp;quot;, //页面路径 &amp;quot;avatar_url&amp;quot;: &amp;quot;http://mmbiz.qpic.cn/mmbiz_png/xxx/640?wx_fmt=png&amp;amp;wxfrom=200&amp;quot;, //头像地址 &amp;quot;cover_cdn_key&amp;quot;: &amp;quot;30520201000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;cover_aes_key&amp;quot;: &amp;quot;ba8221xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;cover_md5&amp;quot;: &amp;quot;e12f93xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;cover_size&amp;quot;: 887690, //封面文件大小 }</code></pre> <p><strong>【141】视频号消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;avatar_url&amp;quot;: &amp;quot;https://wx.qlogo.cn/finderhead/ver_1/xxx/0&amp;quot;, //头像地址 &amp;quot;cover_url&amp;quot;: &amp;quot;http://wxapp.tc.qq.com/251/20304/stodownload?xxx&amp;quot;, //封面地址 &amp;quot;video_url&amp;quot;: &amp;quot;https://channels.weixin.qq.com/web/pages/feed?eid=xxx&amp;quot;, //视频地址 &amp;quot;desc&amp;quot;: &amp;quot;KOC运营效果差?关键做好这两点#企业微信&amp;quot;, //描述信息 &amp;quot;extras&amp;quot;: &amp;quot;CAEQACKxHAAE9Omxxx&amp;quot;, //未知字符串 &amp;quot;nick_name&amp;quot;: &amp;quot;企业微信拍了拍你&amp;quot;, //昵称 &amp;quot;thumb_url&amp;quot;: &amp;quot;http://wxapp.tc.qq.com/251/20304/stodownload?xxxxx&amp;quot; //缩略图地址 }</code></pre> <p><strong>【13】卡片链接消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;title&amp;quot;: &amp;quot;我是标题&amp;quot;, //标题 &amp;quot;desc&amp;quot;: &amp;quot;我是描述信息&amp;quot;, //描述信息 &amp;quot;cover_url&amp;quot;: &amp;quot;http://img.xxx.com/imgextra/i2/1031524252/xxx.jpg&amp;quot;, //封面地址 &amp;quot;target_url&amp;quot;: &amp;quot;https://www.baidu.com&amp;quot; //目标地址 }</code></pre> <p><strong>【6】位置消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;address&amp;quot;: &amp;quot;北极&amp;quot;, //地址 &amp;quot;detail_address&amp;quot;: &amp;quot;一块冰面上&amp;quot;, //详细地址 &amp;quot;lat&amp;quot;: &amp;quot;0.000000&amp;quot;, //纬度 &amp;quot;lon&amp;quot;: &amp;quot;90.000000&amp;quot; //经度 }</code></pre> <p><strong>【16】语音消息的content:</strong></p> <pre><code class="language-json">{ &amp;quot;cdn_key&amp;quot;: &amp;quot;30520201000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;aes_key&amp;quot;: &amp;quot;ba8221xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;md5&amp;quot;: &amp;quot;e12f93xxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;, &amp;quot;size&amp;quot;: 3997, //语音文件大小 &amp;quot;voice_time&amp;quot;: 3 //语音时长 }</code></pre>

页面列表

ITEM_HTML