云真机

API接口文档


下发指令

<h2>简要描述</h2> <p>下发指令可以完成: 1、建群; 2、增删群成员; 3、修改群名; 4、群转让; 5、获取群二维码; 6、增删好友; 7、禁改群名; 8、搜索通讯录成员; 9、增删管理员; 10、修改联系人(好友)标签; 11、获取企微号登录二维码; 12、发朋友圈(一个客户每天最多可见次数是3次); 13、删除朋友圈; 14、修改联系人(好友)备注; 15、修改联系人(好友)描述; 16、添加名片上的人为好友; 17、评论朋友圈; 18、修改联系人(好友)信息; 19、设置群聊邀请是否需要确认(需要企微号是群主或管理员); 20、修改企微号自己在群里的群昵称; 21、添加群聊里的人为好友; 22、保存或移除群聊到通讯录; &lt;font color='red'&gt; 需要注意:1、在收到指令并经过初步校验后,会创建任务并开始异步执行,该接口同步返回创建的任务ID。2、任务状态已完成,仅当任务类型属于(建群、获取群二维码、加好友、搜索通讯录成员、获取企微号登陆二维码、发朋友圈)时表示发送成功,其他类型都仅代表已下发指令,不保证执行成功,是否成功需要依赖下面第二条路径根据具体事件进行判断。如:邀请群成员指令是否成功,可依赖是否有相应的群成员入群事件推送判断是否邀请成功。&lt;/font&gt; 用户有三条路径获取任务执行结果: 1、主动调用[&lt;a href=&quot;<a href="https://www.showdoc.com.cn/yunzhenji/11490699102215489&quot;&gt;查询指令执行结果&lt;/a&gt;]接口查询">https://www.showdoc.com.cn/yunzhenji/11490699102215489&quot;&gt;查询指令执行结果&lt;/a&gt;]接口查询</a>; 2、执行完相应指令后,当有相应的事件发生时,会触发相关&lt;a href=&quot;<a href="https://www.showdoc.com.cn/yunzhenji/11490693160849765&quot;&gt;数据回调&lt;/a&gt;(如增删群成员指令下发后,会触发群成员数据推送">https://www.showdoc.com.cn/yunzhenji/11490693160849765&quot;&gt;数据回调&lt;/a&gt;(如增删群成员指令下发后,会触发群成员数据推送</a>); 3、除了以上两种方式,部分异步执行的任务(建群、获取群二维码、加好友、搜索通讯录成员、获取企微号登陆二维码、发朋友圈)在执行完毕后,也会以“任务完成(taskDone)”作为回调类型把执行结果推送到已设置的回调地址,详见[&lt;a href=&quot;<a href="https://www.showdoc.com.cn/yunzhenji/11490693160849765&quot;&gt;数据回调&lt;/a&gt">https://www.showdoc.com.cn/yunzhenji/11490693160849765&quot;&gt;数据回调&lt;/a&gt</a>;]。</p> <h2>请求URL</h2> <ul> <li><code>https://oapi-yzj.miaokol.com/wechat/pushTask</code></li> </ul> <h2>请求方式</h2> <ul> <li>POST </li> </ul> <h2>请求数据结构</h2> <pre><code>{ &amp;quot;app_id&amp;quot;:&amp;quot;xxxx&amp;quot;, &amp;quot;access_token&amp;quot;:&amp;quot;xxxx&amp;quot;, &amp;quot;task_type&amp;quot;:&amp;quot;xxxx&amp;quot;, &amp;quot;data&amp;quot;:{}, &amp;quot;delayed_time&amp;quot;:&amp;quot;时间戳(秒),如需下发定时指令,可传该参数;否则不传或传0;如:传1645083311 表示指令从2022-02-17 15:35:11开始执行&amp;quot; }</code></pre> <h2>请求示例</h2> <pre><code>POST /wechat/pushTask HTTP/1.1 Host:oapi-yzj.miaokol.com Content-Type: application/json; charset=UTF-8 { &amp;quot;app_id&amp;quot;:&amp;quot;xxx&amp;quot;, &amp;quot;access_token&amp;quot;:&amp;quot;xxx&amp;quot;, &amp;quot;task_type&amp;quot;:&amp;quot;newGroup&amp;quot;, &amp;quot;data&amp;quot;:{ &amp;quot;wxid&amp;quot;:&amp;quot;xxxx&amp;quot;, &amp;quot;room_name&amp;quot;:&amp;quot;群名称&amp;quot;, &amp;quot;member_wxids&amp;quot;:[ &amp;quot;xxx1&amp;quot;, &amp;quot;xxx2&amp;quot; ] } } </code></pre> <h2>响应示例</h2> <pre><code>HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 { &amp;quot;data&amp;quot;:{ &amp;quot;task_id&amp;quot;:&amp;quot;1&amp;quot; }, &amp;quot;errcode&amp;quot;:0 } </code></pre> <ul> <li>task_type 任务类型,具体类型如下:</li> </ul> <table> <thead> <tr> <th style="text-align: left;">指令类型</th> <th style="text-align: left;">说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">&lt;a href=&quot;#newGroup&quot;&gt;newGroup&lt;/a&gt;</td> <td style="text-align: left;">建群</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#groupMemberAdd&quot;&gt;groupMemberAdd&lt;/a&gt;</td> <td style="text-align: left;">添加群成员</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#groupMemberDel&quot;&gt;groupMemberDel&lt;/a&gt;</td> <td style="text-align: left;">删除群成员</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#groupRename&quot;&gt;groupRename&lt;/a&gt;</td> <td style="text-align: left;">修改群名</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#groupTransfer&quot;&gt;groupTransfer&lt;/a&gt;</td> <td style="text-align: left;">群转让(企微号须是群主)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#roomQrcode&quot;&gt;roomQrcode&lt;/a&gt;</td> <td style="text-align: left;">获取群二维码</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#contactAdd&quot;&gt;contactAdd&lt;/a&gt;</td> <td style="text-align: left;">添加联系人</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#contactDel&quot;&gt;contactDel&lt;/a&gt;</td> <td style="text-align: left;">删除联系人</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#disableModifyRoomName&quot;&gt;disableModifyRoomName&lt;/a&gt;</td> <td style="text-align: left;">禁改群名(企微号须是群主或群管理)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#searchUser&quot;&gt;searchUser&lt;/a&gt;</td> <td style="text-align: left;">搜索通讯录成员(注意:搜索结果中包含企微号所在企业的内部员工,也包含其他企微好友、个微好友。如需本企业员工请根据corp_wxid对搜索结果进行过滤。)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#addChatroomAdmin&quot;&gt;addChatroomAdmin&lt;/a&gt;</td> <td style="text-align: left;">添加群管理(企微号须是群主)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#removeChatroomAdmin&quot;&gt;removeChatroomAdmin&lt;/a&gt;</td> <td style="text-align: left;">删除群管理(企微号须是群主)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#changeFanLabel&quot;&gt;changeFanLabel&lt;/a&gt;</td> <td style="text-align: left;">修改联系人(好友)标签</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#getQrcode&quot;&gt;getQrcode&lt;/a&gt;</td> <td style="text-align: left;">获取企微号登录二维码</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#createMoment&quot;&gt;createMoment&lt;/a&gt;</td> <td style="text-align: left;">发朋友圈(一个客户每天最多可见次数是3次)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#deleteMoment&quot;&gt;deleteMoment&lt;/a&gt;</td> <td style="text-align: left;">删除朋友圈</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#commentMoment&quot;&gt;commentMoment&lt;/a&gt;</td> <td style="text-align: left;">评论朋友圈</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#changeFanRemark&quot;&gt;changeFanRemark&lt;/a&gt;</td> <td style="text-align: left;">修改联系人(好友)备注</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#changeFanDesc&quot;&gt;changeFanDesc&lt;/a&gt;</td> <td style="text-align: left;">修改联系人(好友)描述</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#changeFanInfo&quot;&gt;changeFanInfo&lt;/a&gt;</td> <td style="text-align: left;">修改联系人(好友)信息</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#makeFriendFromCard&quot;&gt;makeFriendFromCard&lt;/a&gt;</td> <td style="text-align: left;">添加名片上的人为好友</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#enableInviteConfirm&quot;&gt;enableInviteConfirm&lt;/a&gt;</td> <td style="text-align: left;">设置群聊邀请是否需要确认(需要企微号是群主或管理员)</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#setChatroomMemberNickname&quot;&gt;setChatroomMemberNickname&lt;/a&gt;</td> <td style="text-align: left;">修改企微号自己在群里的群昵称</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#makeFriendFromRoom&quot;&gt;makeFriendFromRoom&lt;/a&gt;</td> <td style="text-align: left;">添加群聊里的人为好友</td> </tr> <tr> <td style="text-align: left;">&lt;a href=&quot;#saveChatroomToContact&quot;&gt;saveChatroomToContact&lt;/a&gt;</td> <td style="text-align: left;">保存或移除群聊到通讯录</td> </tr> </tbody> </table> <ul> <li>不同类型下的data数据结构 &lt;a id=&quot;newGroup&quot;&gt;&lt;/a&gt;</li> <li> <h2>建群(newGroup)</h2> </li> </ul> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">wxid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>企微号wxid</td> </tr> <tr> <td style="text-align: left;">room_name</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>新建群名称</td> </tr> <tr> <td style="text-align: left;">member_wxids</td> <td style="text-align: left;">否</td> <td style="text-align: left;">array</td> <td>建群同时拉人进群,拉人进群的成员wxid数组或不拉人传空数组,不要超过40人,太多的话企微那边执行失败几率会高。</td> </tr> <tr> <td style="text-align: left;">has_external</td> <td style="text-align: left;">否</td> <td style="text-align: left;">int</td> <td>member_wxids中包含外部联系人传1,都是内部员工或为空时传0;默认为0</td> </tr> </tbody> </table> <p>&lt;a id=&quot;groupMemberAdd&quot;&gt;&lt;/a&gt;</p> <ul> <li> <h2>添加群成员(groupMemberAdd)</h2> </li> </ul> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">wxid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>企微号wxid</td> </tr> <tr> <td style="text-align: left;">room_wxid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>群wxid</td> </tr> <tr> <td style="text-align: left;">member_wxids</td> <td style="text-align: left;">是</td> <td style="text-align: left;">array</td> <td>添加成员的wxid(必须是字符串)</td> </tr> <tr> <td style="text-align: left;">history_messages</td> <td style="text-align: left;">否</td> <td style="text-align: left;">array</td> <td>邀请入群并附带聊天记录(仅登录apad/ipad平台支持),数据格式见下方</td> </tr> </tbody> </table> <p>&lt;font color=&quot;red&quot;&gt;<strong>注意:history_messages里的内容要使用2天内的聊天记录,且最多不超过30条,否则容易出错;</strong>&lt;/font&gt; history_messages结构:</p> <table> <thead> <tr> <th style="text-align: left;"></th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">msg_type</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>消息类型;&lt;a href=&quot;<a href="https://www.showdoc.com.cn/qybopen/7990161805486320&quot;&gt;参见聊天消息数据结构介绍&lt;/a&gt">https://www.showdoc.com.cn/qybopen/7990161805486320&quot;&gt;参见聊天消息数据结构介绍&lt;/a&gt</a>;</td> </tr> <tr> <td style="text-align: left;">content</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>消息内容,原封不动使用聊天记录里的内容</td> </tr> <tr> <td style="text-align: left;">corp_wxid</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>消息发送人归属的企业ID,个微就固定写死:1970325134026788</td> </tr> <tr> <td style="text-align: left;">from_name</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>发送人昵称</td> </tr> <tr> <td style="text-align: left;">from_wxid</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>发送人wxid</td> </tr> <tr> <td style="text-align: left;">msg_time</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>消息发送时间</td> </tr> </tbody> </table> <p>history_messages结构示例如下:</p> <pre><code>[     {         &amp;quot;msg_type&amp;quot;: &amp;quot;text&amp;quot;         &amp;quot;content&amp;quot;: {//消息内容,原封不动使用聊天记录里的内容             &amp;quot;items&amp;quot;: [                 {                     &amp;quot;type&amp;quot;: &amp;quot;text&amp;quot;,                     &amp;quot;text&amp;quot;: &amp;quot;22222&amp;quot;                 }             ]         },         &amp;quot;corp_wxid&amp;quot;: &amp;quot;1970325134026788&amp;quot;,         &amp;quot;from_name&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;from_wxid&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;msg_time&amp;quot;: &amp;quot;1724664989&amp;quot;//该条消息的发送时间,直接使用聊天记录里的msg_time     },     {         &amp;quot;msg_type&amp;quot;: &amp;quot;picture&amp;quot;,         &amp;quot;content&amp;quot;: {//消息内容,原封不动使用聊天记录里的内容,字段要完整带上;             &amp;quot;height&amp;quot;: 2560,             &amp;quot;width&amp;quot;: 1920,             &amp;quot;size&amp;quot;: 175272,             &amp;quot;org_content&amp;quot;: {                 &amp;quot;file_type&amp;quot;: 2,                 &amp;quot;hash&amp;quot;: &amp;quot;eec7dda5c153722e1e3a0f2c8bf6bfb0&amp;quot;,                 &amp;quot;key&amp;quot;: &amp;quot;&amp;quot;,                 &amp;quot;md5&amp;quot;: &amp;quot;7173a858c310c28cde652bcfc3e90e95&amp;quot;,                 &amp;quot;raw_type&amp;quot;: 14,                 &amp;quot;wxurl&amp;quot;: &amp;quot;306902010204623060020100020477f8a9c402030f42410204bf795875020466cc4ca4042430653936356530322d616361302d343734612d396237632d366134313066613334636361020100020302acb004107173a858c310c28cde652bcfc3e90e950201020201000400&amp;quot;             },             &amp;quot;url&amp;quot;: &amp;quot;//qiyunbao.oss-cn-hangzhou.aliyuncs.com/public/wechatdata/7/21/chatroom/20240826/1688851873049028/pic/7173a858c310c28cde652bcfc3e90e95.jpg&amp;quot;         },         &amp;quot;corp_wxid&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;from_name&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;from_wxid&amp;quot;: &amp;quot;xxx&amp;quot;,         &amp;quot;msg_time&amp;quot;: &amp;quot;1724664997&amp;quot;     } ]</code></pre> <p>&lt;a id=&quot;groupMemberDel&quot;&gt;&lt;/a&gt;</p> <ul> <li> <h2>删除群成员[groupMemberDel]</h2> </li> </ul> <p>|参数名|必选|类型|说明|```</p> <pre><code>|:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |member_wxids |是 |array | 删除成员的wxid(必须是字符串) | &amp;lt;a id=&amp;quot;groupRename&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改群名(groupRename) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |room_name |是 |string | 新群名称 | &amp;lt;a id=&amp;quot;groupTransfer&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 群转让(groupTransfer) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 群主wxid(需保证群主企微号在智域管家.云真机登录) | |room_wxid |是 |string | 群wxid | |new_owner_wxid |是 |string | 新群主wxid | &amp;lt;a id=&amp;quot;roomQrcode&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 获取群二维码(roomQrcode) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | &amp;lt;a id=&amp;quot;contactAdd&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 添加联系人(contactAdd) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |content |是 |string | 打招呼信息,文本 | |mobile |是 |string | 手机号,或者使用企微官方API生成的【&amp;lt;a href=&amp;quot;https://developer.work.weixin.qq.com/document/16997&amp;quot;&amp;gt;手机号对应的随机串】&amp;lt;/a&amp;gt; | |flag |否 |int | 1:仅加对方个微号;2:仅加对方企微号;3:同时加对方个微号和企微号,默认1 | &amp;lt;a id=&amp;quot;contactDel&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 删除联系人(contactDel) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |contact_wxid |是 |string | 联系人wxid | |corp_wxid |是 |string | 联系人所在企业wxid,个微传空字符串 | &amp;lt;a id=&amp;quot;disableModifyRoomName&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 禁改群名(disableModifyRoomName) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid[必须是群主] | |room_wxid |是 |string | 群wxid | |disable |是 |int | 是否禁改群名,0否1是; | &amp;lt;a id=&amp;quot;searchUser&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 搜索企微号的通讯录成员(searchUser) - 注意:搜索结果中包含企微号所在企业的内部员工,也包含其他企微好友、个微好友。如需本企业员工请根据corp_wxid对搜索结果进行过滤。 |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |text |是 |string | 同企业内部员工名称关键词 | &amp;lt;a id=&amp;quot;addChatroomAdmin&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 添加群管理(addChatroomAdmin) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |admin_list |是 |array | 管理员wxid,string数组[] | &amp;lt;a id=&amp;quot;removeChatroomAdmin&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 删除群管理(removeChatroomAdmin) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |admin_list |是 |array | 管理员wxid,string数组[] | &amp;lt;a id=&amp;quot;changeFanLabel&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改好友标签(changeFanLabel) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |contact_wxid |是 |string | 联系人wxid | |corp_tag_wxids |是 |string | 企业标签wxid,多个以英文逗号分隔,如:&amp;quot;14073752039745680,14073752039744955&amp;quot;。&amp;lt;br/&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;注意事项:&amp;lt;/font&amp;gt;&amp;lt;br/&amp;gt;1、通过&amp;lt;a href=&amp;quot;https://www.showdoc.com.cn/qybopen/7988274858303131&amp;quot;&amp;gt;标签接口&amp;lt;/a&amp;gt;查询某企业下所有标签;&amp;lt;br/&amp;gt;2、该字段是覆盖更新:所以要删除所有标签就传空字符;要新增标签需要带上该联系人之前已有的标签wxid,组合后传参;要修改标签则直接传所需要的所有标签组合; | &amp;lt;a id=&amp;quot;getQrcode&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 获取企微号登录二维码(getQrcode) - &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;注意:近期,企微微信更新了客户端登录机制,扫码后需要输入验证码才能登录了。通过API获取的企微号登录二维码,手机端扫码后跳出来的验证码,需要通过调用校验验证码接口进行校验。点击跳转至&amp;lt;a href=&amp;quot;https://www.showdoc.com.cn/1702411877508139/10490943302006009&amp;quot;&amp;gt;验证码校验接口&amp;lt;/a&amp;gt;&amp;lt;/font&amp;gt; - 回调返回的二维码字段qrcode_base64是图片内容的base64格式,显示时,在返回的内容前添加&amp;quot;data:image/jpeg;base64,&amp;quot; 即可直接显示。如: ```&amp;lt;img src=&amp;quot;data:image/jpeg;base64,...&amp;quot;&amp;gt;``` |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |sub_user_id |是 |int | 登录到的子账号ID,到主账号传0即可,可通过&amp;lt;a href=&amp;quot;https://www.showdoc.com.cn/qybopen/9015828090519621&amp;quot;&amp;gt;子账号列表&amp;lt;/a&amp;gt;获取 | |group_id |是 |int | 登录到的企微号分组ID,到未分组传0即可,可通过&amp;lt;a href=&amp;quot;https://www.showdoc.com.cn/qybopen/9015851484618603&amp;quot;&amp;gt;企微号分组列表&amp;lt;/a&amp;gt;获取 | |login_wxid|否|string|支持带上要登录的企微号wxid,带了该参数会有以下几种情况:1、该企微号在智域管家.云真机平台登录过且可以直接登录无需扫码,则此次请求会直接登录不再异步返回登录二维码;2、未登录过或登录失败,则同步返回此次任务ID。同时异步返回绑定了该企微号的登录二维码,只有使用该企微号扫码才可正常登录,使用其他企微号扫码无效。| |os |否 |string | 登录到的服务器系统,AndroidPad传&amp;quot;apad&amp;quot;,ipad传&amp;quot;ipad&amp;quot;,Mac传&amp;quot;mac&amp;quot;,默认不传或传空字符串表示Windows | &amp;lt;a id=&amp;quot;createMoment&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 发朋友圈(createMoment)(一个客户每天最多可见次数是3次) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |moment |是 |object | 朋友圈内容,格式见下面 | |visible_range |否 |object | 可见范围,格式见下面 | moment,结构如下:</code></pre> <p>{ text: &quot;&quot;, //文本内容</p> <pre><code> //以下字段优先级:image &amp;gt; video &amp;gt; link &amp;gt; channels image: ['img_url1', 'img_url2'], //图片,最多9张。每张图片大小不超过1M。 video: { url: 'video_url', //视频文件地址,mp4格式,30秒内,大小不超过10M, }, link:{ title:'链接标题', url:'链接地址', cover:'封面地址' }, channels:{ //视频号内容,需要从素材库选择,字段和消息channels的content字段保持一致。 url:'', title:'', desc:'', avatar:'', cover:'', org_content:{} }</code></pre> <p>}</p> <pre><code>visible_range,结构如下:</code></pre> <p>//以下字段设置可见范围(user_list + tag_list), 如果没有visible_range字段,认为是全部可见。 { user_list:['',''], //wxid 列表 tag_list:['', ''], //标签id列表 }</p> <pre><code>- ## 请求示例 </code></pre> <p>POST /wechat/pushTask HTTP/1.1 Host:oapi-yzj.miaokol.com Content-Type: application/json; charset=UTF-8 {     &quot;app_id&quot;:&quot;xxxxx&quot;,     &quot;access_token&quot;:&quot;xxxxxxxxx&quot;,     &quot;data&quot;:{         &quot;wxid&quot;:&quot;1688851873xxxxx&quot;,         &quot;moment&quot;:{             &quot;text&quot;:&quot;第2条&quot;,             &quot;image&quot;:[                 &quot;<a href="https://qiyunbao.oss-cn-hangzhou.aliyuncs.com/u/21/20220725/0590ba63908fc052b823c25386c6004f.jpg&quot">https://qiyunbao.oss-cn-hangzhou.aliyuncs.com/u/21/20220725/0590ba63908fc052b823c25386c6004f.jpg&quot</a>;,                 &quot;<a href="https://qiyunbao.oss-cn-hangzhou.aliyuncs.com/u/21/20220725/0590ba63908fc052b823c25386c6004f.jpg&quot">https://qiyunbao.oss-cn-hangzhou.aliyuncs.com/u/21/20220725/0590ba63908fc052b823c25386c6004f.jpg&quot</a>;             ]         },         &quot;visible_range&quot;:{             &quot;user_list&quot;:[                 &quot;客户wxidxxxx1&quot;,                 &quot;客户wxidxxx2&quot;             ]         }     },     &quot;task_type&quot;:&quot;createMoment&quot; }</p> <pre><code> &amp;lt;a id=&amp;quot;commentMoment&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 评论朋友圈(commentMoment) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |task_id |是 |string | 发朋友圈返回的task_id | |text |是 |string | 评论的内容文本 | &amp;lt;a id=&amp;quot;deleteMoment&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 删除朋友圈(deleteMoment) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |task_id |是 |string | 发朋友圈返回的task_id | &amp;lt;a id=&amp;quot;changeFanRemark&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改联系人(好友)备注(changeFanRemark) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |contact_wxid |是 |string | 联系人wxid | |remark |是 |string | 文本,备注内容 | &amp;lt;a id=&amp;quot;changeFanDesc&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改联系人(好友)描述(changeFanDesc) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |contact_wxid |是 |string | 联系人wxid | |desc |是 |string | 文本,描述内容 | &amp;lt;a id=&amp;quot;changeFanInfo&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改联系人(好友)信息(changeFanInfo) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |contact_wxid |是 |string | 联系人wxid | |desc |是 |string | 文本,描述内容 | |remark |是 |string | 备注| |corp_name |是 |string | 公司名称| |phone_list |是 |string[] | 电话,[&amp;quot;xxx1&amp;quot;,&amp;quot;xxx2&amp;quot;]| &amp;lt;a id=&amp;quot;makeFriendFromCard&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 添加名片上的人为好友(名片来自其他人发给企微号)(makeFriendFromCard) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |card_wxid |是 |string | 名片wxid(来自聊天名片消息) | |sender_wxid |是 |string | 发送名片的人的wxid(来自聊天名片消息) | |verify_message |是 |string | 验证消息 | &amp;lt;a id=&amp;quot;enableInviteConfirm&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 设置群聊邀请是否需要确认(需要企微号是群主或管理员) (enableInviteConfirm) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |enable |是 |int | 是否开启需要确认:1 是;0 否; | &amp;lt;a id=&amp;quot;setChatroomMemberNickname&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 修改企微号自己在群里的群昵称(setChatroomMemberNickname) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |nickname |是 |string | 企微号在群里的昵称 | &amp;lt;a id=&amp;quot;makeFriendFromRoom&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 添加群聊里的人为好友(企微号需要在群里)(makeFriendFromRoom) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |member_wxid |是 |string | 群成员wxid | |corp_wxid |是 |string | 群成员所属企业wxid(从群成员列表或群成员回调信息里获取corp_wxid) | |content |是 |string | 验证消息 | &amp;lt;a id=&amp;quot;saveChatroomToContact&amp;quot;&amp;gt;&amp;lt;/a&amp;gt; - ## 保存或移除群聊到通讯录(saveChatroomToContact) |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |wxid |是 |string | 企微号wxid | |room_wxid |是 |string | 群wxid | |save |是 |int | 保存: 1; 移除:0; |</code></pre>

页面列表

ITEM_HTML