聚合聊天openAPI文档
因企业微信性能和规则限制,调用openAPI的时候需要注意以下规则:
详见请点击:openAPI调用规则说明
使用说明
API鉴权
💡需要在header中传入apikey参数,apikey获取方式如下:
step1:打开浏览器输入网址:https://account.gnlab.com/auth
step2:选择使用光年主账号登录(apikey只有登录光年主账号才能获取到)
step3:导航至“基本信息”--点击“通过短信发送”(apikey将会发送至绑定的手机号)
请求示例
curl --location --request GET 'http://localhost/gnapi/open/inner/user/wx/list' \
--header 'apikey: xxxxxxx' \
API调用示例
💡为方便读者快速掌握Quntool openAPI 调用方法,我们提供了各个API 接口的Postman调用示例,下载下方的json文件,导入postman。 将服务器地址和相关参数进行替换,即可进行调用。
quntool_openAPI.postman_collection.json
回调消息
💡发送消息如果是通过openAPI发送的,那么返回字段就会有"isOpenApi":true
通过quntool或者openapi发送消息时,如果发送失败,则字段中的error_code不为0,目前已知会造成失败的情况是发送频率超过企微官方限制
需要提前在网页端配置好回调地址。
(管理员访问网页端 - 左下角“系统管理” - 沟通中台 API)
回调参数:
- source string 容器id
- userId string quntool登录用户id(即光年账号id)
- wxid string 企业微信id(即登录quntool系统的企业微信id)
- timestamp string 发起回调时间
- type string 消息类型
- data object 消息体
- sendMsgId string 通过发消息接口发送的消息会有此字段,对应发送接口返回的msgId
登录二维码状态
type为 qrcode_status_msg
{
"msgId":"3c2bbad6-2766-4d3c-a8d5-f9a7e352d24e",
"source":"17eeb4b5a466",//就是hostname
"userId":null,
"wxid":"",
"timestamp":1697793173604,
"type":"qrcode_status_msg",//消息类型
"data":{
"auth_deviceid":"baab90ef80ca9f2f",
"corpid":"1970325032041886",//这个企业微信的企业主体id
"gid":"2251802343725191",
"icon_url":"https:\/\/[wework.qpic.cn](http://wework.qpic.cn/)\/wwpic\/432747_J-GmtzgQQ02OMfv_1650209771\/0",
"is_bind_wx":true,
"keep_sec":600,
"lang_type":1,
"logo":"https:\/\/[p.qlogo.cn](http://p.qlogo.cn/)\/bizmail\/1icHEZ7ow1wlxR3ic8d5PQsYBjI6YtiaMz3qP2JUfiafn3ORu9yfQNa4sg\/0",
"nick_name":"helloni4栋",//这个企业微信在app页面上的‘姓名’字段
"qrcode_key":"6E16C7042D0A4E832114E839EB1694CE",
"status":10,//标识着二维码的状态
"vid":"1688850535328682"//这个企业微信的wxid
}
其中 status
值标识着二维码的状态 ,值如下:
enum QrcodeStatus {
QRCODE_LOGIN_NEVER = 0;
QRCODE_LOGIN_ING = 1;
QRCODE_LOGIN_SUCC = 2;
QRCODE_LOGIN_FAIL = 3;
QRCODE_LOGIN_REFUSE = 4;
QRCODE_LOGIN_ING_WX = 5;
QRCODE_LOGIN_SUCC_WX = 6;
QRCODE_LOGIN_FAIL_WX = 7;
QRCODE_LOGIN_REFUSE_WX = 8;
QRCODE_WX_AUTH_OK = 9;
QRCODE_REQUIRE_VERIFY = 10;
}
当 status
== QRCODE_REQUIRE_VERIFY(10) 时, 也就是需要登录验证码了,在业务前端让用户输入验证码
扫码安全验证
经测试发现,部分企业微信在该服务器上是第一次登录,那么在25分钟左右会推送新设备安全验证二维码
type为 safe_validate
{
"msgId":"3c2bbad6-2766-4d3c-a8d5-f9a7e352d24e",
"source":"17eeb4b5a466",//就是hostname
"userId":"apps-1",//光年账号id
"wxid":"168885056393XXXX",//登录的企业微信id
"timestamp":1697793173604,
"type":"safe_validate",//消息类型
"data":{
"Qrcode":"/gnapi/files/cache/xxxxxx.jpg",//待扫描的二维码图片地址 (有效期5分钟)
"UserName":"企业微信名称"
}
}
文字消息
type为 text_msg
quntool端接收消息的回调如下:
{ "msgId":"fecd1bdc-0924-4fde-b1a6-7f9adb0ebc44", "source":"40c10a375784", "userId":"apps-1",//光年账号id "wxid":"168885056393XXXX",//登录的企业微信id "timestamp":1686708147954, "type":"text_msg",//消息类型 "data":{ "appinfo":"5079167612398453673", "at_list":[],//群聊@某人 "content":"呼啦", "content_type":2, "conversation_id":"S:168885056393XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":0, "local_id":"1363", "receiver":"168885056393XXXX",//登录的企业微信id(接收消息方) "send_time":"1686708146", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1012206"//企业微信服务端消息id }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"1f87e08a-9d7e-48ce-9ebe-0c4bd09c88ef", "source":"40c10a375784", "userId":"apps-1",//光年账号id "wxid":"168885056393XXXX",//登录的企业微信id "timestamp":1686708431977, "type":"text_msg",//消息类型 "data":{ "at_list":[],//群聊@某人 "content":"早晨阳光里!", "content_type":0, "conversation_id":"S:16888505639XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686708431, "sender":"168885056393XXXX",//登录的企业微信id(发送消息方) "server_id":"1012209",//企业微信服务端消息id "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"a142fe5f-0220-4084-931c-1206987fbae1" }
图片消息
type为 image_msg
💡file_path为服务器图片相对路径,前面需要带上quntool的域名才能访问,例如:http://192.168.1.1/gnapi/files/Cache/20230614/43aee759371c4216b26340ce41d618c4/e445ae6b-8f90-4619-8c79-a1ee09552610.jpg
quntool端接收消息的回调如下:
{ "msgId":"00cdea10-ad7c-4c19-b7d4-65815ce0e7af", "source":"28cca2a4c405", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686709131877, "type":"image_msg",//消息类型 "data": { "appinfo":"6655054962426530162", "cdn":{ "aes_key":"f4fc952536b0206aa21d382e1833c42f", "auth_key": "v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3f17254570244c03b61b579b7d7475c107c7a7d126d4e729eedb9c777a5caf89f", "file_name":"", "height":120, "ld_size":4148, "ld_url":"https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3a9685f5db331124e64948a443d41beff1c3a1f62a8d0c4cec9bffdaf74d195a0bacc3f26566be46416b46ee5fb7eda9b3f6b583325610ea4fe14abfa988d4fda0f633f59c4028ba7518011ef3f22885ef4552b2240a73f4403263b35c9094523842e1463eca50bfa025a728e95c38c548623aee4639293fbd60ef7c5f728b3aecc9cc11ef78cfcadf25a7f5904b2b274b578adb62cdc5e71cbedbfcc8143d9a5a5079bc30364dc4d1d7104c70fca2b04853cc9b66146e504a53300bb862d4d50570f10f37a73e7bb4d8b9f38578feacf723252d040f22ff431e3997fdaaa34b1", "md5":"9537ed76b4731c211e863dac2c9cffb0", "md_size":149248, "md_url":"https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3f8e713d5219cc4f6b82ec9712863d045bb9929145bb15c25ebee35156c125ed69b073f9c255515b28a7e4fbb0f2afae996a048ea7f035fae8c7304c780a34f81faef4ddb845ed56746db209144295be37d3d18bbfeb2df44b3e403403b0ddd57ed25f962b282e06ebed15e7a5c2aec63700e36435e8ed7587e71941bc6f5c0ff00a3e3d4cbdcd76e28c949c03716bdac83417b989ac21fe3eb37129e1c891812c1346225f13e0b76c2cc2b38e33866ddf317a69a6425daaf114ec224facac7f138ed8c6df9ab46b624ce2a2c0cbdb3bf3fd08447dbbe118577db1605ccff24fa", "size":149248, "url":"https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3f8e713d5219cc4f6b82ec9712863d045bb9929145bb15c25ebee35156c125ed69b073f9c255515b28a7e4fbb0f2afae996a048ea7f035fae8c7304c780a34f81faef4ddb845ed56746db209144295be37d3d18bbfeb2df44b3e403403b0ddd57ed25f962b282e06ebed15e7a5c2aec63700e36435e8ed7587e71941bc6f5c0ff00a3e3d4cbdcd76e28c949c03716bdac83417b989ac21fe3eb37129e1c891812c1346225f13e0b76c2cc2b38e33866ddf317a69a6425daaf114ec224facac7f138ed8c6df9ab46b624ce2a2c0cbdb3bf3fd08447dbbe118577db1605ccff24fa", "width":89 }, "cdn_type":1, "content_type":101, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":0, "local_id":"1116", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686709128", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1046994",//企业微信服务端消息id "imgWidth":1279, "imgHeight":1706, "file_path": "/gnapi/files/Cache/20230614/43aee759371c4216b26340ce41d618c4/e445ae6b-8f90-4619-8c79-a1ee09552610.jpg"//服务器图片相对路径 }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"b33417f3-7187-4fb1-993b-16aca04bf8dd", "source":"28cca2a4c405", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686709315597, "type":"image_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686709315, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1046999",//企业微信服务端消息id "file_path": "/gnapi/files/Storage/20230614/39855b938f6b54afee4697cc7e36f6aa/test1026.png",//服务器图片相对路径 "imgWidth":200, "imgHeight":200, "cdn_type":0, "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "width":200, "height":200, "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"ed36b78b-e565-4cbe-bcc8-24b0b53241cd" }
视频消息
type为 video_msg
quntool端接收消息的回调如下:
{ "msgId":"d1cc11ae-ee66-415e-aa3c-eea5d461135a", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724100774, "type":"video_msg",//消息类型 "data": { "appinfo":"3131433406605729559", "cdn":{ "aes_key":"1cf0aa5caafe41331897680c7e086058", "auth_key": "v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc358f04aedda6838826986764b9c5276d2b059aadd8d1f4c9e4516395fd6d249e1", "file_name":"", "md5":"3b842926bdf06a9711c7e7dc38438368", "preview_img_size":2689, "preview_img_url":"https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc31057769457cf220231163801da407c859d6cfb1629a318111ab402ebe0edccdd0000d23a7bd278fd882d124c1a10dcb5843d3b45d9d4117c1b6381588969dfbae938e48f843144ec67e720ae4194c388f04f1a2caac88e08c798117265612fd6400c2713065c18e5c53533421fce96e015b70a65c19fa4079efaaefb1e05dec8a648c6a21b81c2592ad79fb35c6b3491c16a7f1ea9d1c2aaf1275d8261d7cdb5c96515fcc276716fbe1386625b7dac40740ab550c27876c6157d9e0dbdedcc401f569972349cc03fd1667ebc943b14f9500ddb418fa79f682ed782c026d05a161", "size":2051752, "url":"https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3b3e90730a0481a2be958759200768cc59c33df59080a4a9f1d5d270191ad48cc30b1a416388e4793de91201d8b8243a1ecdb30305827548581fc73c0e130eb4c5e196a3d9d0effa7488765f750826214121ae5d62cd9b674c1a3b9978bb2d0956aaaa3f8d4c798dee9f010405bf846c3e4f57e67dfce198303b37495ae9bd1737650676d8c656af167186a164a9216953555d8867f48a7b08e6cc8987ebc962aee243e6f495892474ee51bcd3b1f27cc5b62158c347066511f456e025d0566321b932e772055dc99dcd6667279dc63910c4fcb868251e825f81ba57e051fffca" }, "cdn_type":1, "content_type":103, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "duration":29,//视频时长 "height":0, "is_pc":0, "local_id":"1046", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686724097", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047044",//企业微信服务端消息id "width":0, "videoWidth":368, "videoHeight":640, "file_path": "/gnapi/files/Cache/20230614/e76f4818406b4313847b29d35e0c2ec1/448140b5-5f28-45ce-a7d2-ea04ba58b32b.mp4"//服务器图片相对路径 }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"2e4794f6-69e9-4af6-8669-05bdbc64a0dc", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686723774583, "type":"video_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686723774, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047042",//企业微信服务端消息id "file_path":"/gnapi/files/Storage/20230614/a14c1969b8ae605754fa655d512c2547/视频压缩后.mp4",//服务器图片相对路径 "videoWidth":720, "videoHeight":1280, "cdn_type":0, "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"efe88c09-bdb4-4e25-9740-2d8de7a74b1e" }
语音消息
type为 voice_msg
quntool端接收消息的回调如下:
{ "msgId":"01c0b166-4dfb-4239-bcf9-1765d7c45f92", "source":"28cca2a4c405", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686709999697, "type":"voice_msg",//消息类型 "data": { "appinfo":"3232881452555685120", "cdn":{ "aes_key":"7065676876747A786178757967757674", "file_id": "30818002010204793077020100020458e1a00602031e903802042ac6f46d0204648926ee044c313439313138313537345f37303635363736383736373437413738363137383735373936373735373637345f3261323862366436373031373665346564653633623466663430373036643331020100020214b004000201050201000400", "file_name":"", "md5":"2a28b6d670176e4ede63b4ff40706d31", "size":5282 }, "cdn_type":2, "content_type":16, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "duration":3,//语音时长 "is_pc":0, "local_id":"1118", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686709997", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047001",//企业微信服务端消息id "file_path": "/gnapi/files/Cache/20230614/d10147b54e2c40f6833b6cfef7843d26/07ec105e-31ed-4d88-9526-bde57ee95833.aac"//服务器图片相对路径 }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"757820de-f426-4644-bd00-9c073ddc7365", "source":"28cca2a4c405", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686710201713, "type":"voice_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686710201, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047004",//企业微信服务端消息id "duration":4,//语音时长 "file_path": "/gnapi/files/Storage/20230614/3e82185b4771597662c2532150d6522e/local_audio_1686710199.0.aac",//服务器图片相对路径 "cdn_type":0, "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"2362ff74-0b26-4491-819a-784f716f0869" }
文件消息
type为 file_msg
quntool端接收消息的回调如下:
{ "msgId":"b5e1b295-7b98-43fa-b9df-cff72b79eafb", "source":"28cca2a4c405", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686715302251, "type":"file_msg",//消息类型 "data": { "appinfo":"3981951480332555928", "cdn": { "aes_key":"edef928c0f6c3cf25d788f46218f8ac8", "auth_key": "v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc32d9cb999605c1613892e4b0be8ec733e7dc7ecfba10b86d784ef4879d8408e4a", "file_name":"Setup.log", "md5":"67717327f234ccdaf083b132e66341f3", "size":3375050, "url": "https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3c5cae9f74fb14f4e5a4a833bb26174fc5fde347b9219ca90c236685a5665f7c872a1374e073a09b562596a5790b3fe598e66369939956de2ff0633769037b65df5e214e8505d6f5eb191489d57cd2b87172406acf7bb3761c63a9482bdf22fc80ea7bfa8f66c3f63e2a472ba6b7f60e4ddfc8bda3449b9b67721796d5e6dd37ef42199da1c06cf73bf8be619159cf117de88759260ed352796a793788d02b5711f641929040637ecd5830f6735e1a36b9aa0b784bd099986826382a4c383b3a7d07ee3807aea4fff7f753b2fa0e29548d754c6d92a325ab60a0187fbe3afa65a" }, "cdn_type":1, "content_type":102, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":0, "local_id":"1123", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686715299", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047022",//企业微信服务端消息id "file_path": "/gnapi/files/Cache/20230614/047a42f078dc49429b1b10ab3d81566e/Setup.log",//服务器图片相对路径 "file_size":3375050 }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"56354d83-47a3-4dd3-9c7f-93d63c69a3d3", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686723241859, "type":"file_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686723241, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047040",//企业微信服务端消息id "file_path": "/gnapi/files/Storage/20230614/c91a30553e0deb32214f24a5e32fded0/AItest.txt",//服务器图片相对路径 "cdn_type":0, "cdn": { "aes_key":"65666266393962316265306639336538", "file_id": "3052020102044b304902010002040bec56c302030f42410204bf795875020464895aa9040d31363836373233323430393335020100020300d2800410c91a30553e0deb32214f24a5e32fded00201050201000400", "file_name":"AItest.txt", "ld_size":0, "md5":"c91a30553e0deb32214f24a5e32fded0", "md_size":0, "size":53886 }, "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"884ff834-3cec-492b-a318-9b6371f58de8" }
位置消息
type为 location_msg
quntool端接收消息的回调如下:
{//此消息由微信用户发送 "msgId":"0257e9c3-3569-4ab1-972c-71784f5c9af3", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526xxxx",//登录的企业微信id "timestamp":1686732606756, "type":"location_msg",//消息类型 "data": { "address":"浙江省杭州市西湖区余杭塘路866号", "appinfo":"1438640993989321696", "content_type":6, "conversation_id":"S:168885435526xxxx_788130083907xxxx",//若是群聊则是R:群聊id "is_pc":0, "latitude":30.30261, "local_id":"1055", "longitude":120.08213, "receiver":"168885435526xxxx",//登录的企业微信id(接收消息方) "send_time":"1686732604", "sender":"788130083907xxxx",//发送方(客户)的微信id "sender_name":"左脚",//发送方(客户)的微信昵称 "server_id":"1047075",//企业微信服务端消息id "title":"浙江大学(紫金港校区)", "zoom":15 }, "sendMsgId":null }
链接卡片消息
type为 link_card_msg
quntool端接收消息的回调如下:
{ "msgId":"6cb1f18b-fda9-4b85-be08-82983cc8835f", "source":"c0b764946118", "userId":"apps-1",//光年账户id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724245564, "type":"link_card_msg",//消息类型 "data": { "appinfo":"8893562549067337205", "cdn": { "aes_key":"7761616e6f766f61657876636f716578", "auth_key": "v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc35d28542488c26a0f2a76974fd7974650db6be94197c8c56bed6c73f29810b14f", "size":84662, "url": "https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_40ce011f2f6fe517f543b5d7ae25fdd67189ab73ea0d1ff379b07cadd716ecc3af39385ae55f442ba563b496f2ce55a2a93efd5d305130d4778a9b548f5b37fbc8c80e448d9fbacf804445004b3b5019dbc8a2387ec38d10937fd13d39bc2a19a3baa668f2f66655719958e2d913ad504739c21f9da431fac75c2c7840544e713810f4d2ac8c0e3e11bb51d9804732ed4520842cdde314ed91517338ae71d2608e29cfaf857735c8d57ec96df2c69a1c355977913277658dce270eb8fb3c4fd6b4c7e3f70ea757091cea4eb22ae78918f842cca167ed280c4bc13acededfa88898282ffefd76212bbb688ea038ed77b1" }, "cdn_type":1, "content_type":13, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "desc":"真正的流量增长专家!", "image_url":"", "is_pc":0, "local_id":"1048", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686724243", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047049",//企业微信服务端消息id "title":"光年实验室", "url":"https://www.gnlab.com" }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"8dcce7fd-b8fd-43ad-8935-b7368ddbcbbc", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724196284, "type":"link_card_msg",//消息类型 "data": { "desc":"真正的流量增长专家!", "image_url": "http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.jpg", "title":"光年实验室", "url":"https://www.gnlab.com", "content_type":0, "conversation_id": "S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686724196, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047047",//企业微信服务端消息id "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "isOpenApi":true,//若不是通过openAPI发送,就不会有这个字段 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"90fe74c0-7488-474a-892a-e2698ddc0191" }
表情消息
type为 emoticon_msg
quntool端接收消息的回调如下:
{ "msgId":"6b17115d-8d01-47e2-b466-fa2c1f722e30", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686731856310, "type":"emoticon_msg",//消息类型 "data": { "appinfo":"7945599339216066811", "cdn":{ "aes_key":"", "file_id":"", "md5":"ac39c925acba989e615653dfcbe04398", "size":0 }, "cdn_type":1, "content_type":29, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "height":240, "is_pc":0, "local_id":"1054", "name":"动画表情", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686731854", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客人的微信昵称(发送消息方) "server_id":"1047072",//企业微信服务端消息id "source_type":101, "type":2, "url": "https://wework.qpic.cn/wwpic/wwwx_ac39c925acba989e615653dfcbe04398/0", "width":240 }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"9fd299a8-f72d-44dc-8094-40dcc30bd177", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686731710625, "type":"emoticon_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "local_id":"0", "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":"1686731710", "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047070",//企业微信服务端消息id "url":"https://wework.qpic.cn/wwpic/wwwx_178ab4d7100d8cf51f736f55109b70a7/0", "width":240, "height":240, "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"1dc24cc9-c874-4097-bab7-aeea2790a680" }
红包消息
type为 red_packet_msg
quntool端接收消息的回调如下:
{//此消息由微信用户发送 "msgId":"8c78eef0-0017-41b5-9c05-b9bbb2a014ba", "source":"c0b764946118", "userId":"apps-1",//光年的账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686732884811, "type":"red_packet_msg",//消息类型 "data": { "appinfo":"hongbao_788130083907XXXX_1800008896202306147404849530015", "content_type":26, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "desc":"来自左脚的红包,请进入手机版企业微信查看", "is_pc":0, "local_id":"1056", "money":1, "packet_id":"1800008896202306147404849530015", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "remark":"", "send_time":"1686732884", "sender":"788130083907XXXX",//发送方(客户)的微信id "sender_name":"左脚",//发送方(客户)的微信昵称 "server_id":"1047078"//企业微信服务端消息id }, "sendMsgId":null }
个人名片消息
type为 person_card_msg
quntool端接收消息的回调如下:
{ "msgId":"ec38aece-07fb-4688-95aa-8f90c739dd34", "source":"6676423bf911", "userId":"apps-2",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686746944365, "type":"person_card_msg",//消息类型 "data":{ "appinfo":"7325909076836555726", "avatar"://名片好友的头像 "http://wx.qlogo.cn/mmhead/Q3auHgzwzM5dmJtMIxtVPhHmw57Xfw2FvEfuBwon7RMOEYa2sSnEuA/0", "content_type":41, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "corp_id":0, "corp_name":"微信", "is_pc":0, "local_id":"1062", "nickname":"峰哥",//名片好友的微信昵称 "receiver":"168885435526XXXX",//登录的企业微信id(接收名片消息方) "send_time":"1686746942", "sender":"788130083907XXXX",//客户的微信id(发送名片消息方) "sender_name":"左脚",//客户的微信昵称(发送名片消息方) "server_id":"1047189",//企业微信服务端消息id "source":"微信", "user_id":"788130195497XXXX"//名片好友的微信id }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"180d9180-3a65-448d-9c4d-518740b46c42", "source":"6676423bf911", "userId":"apps-2",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686746504905, "type":"person_card_msg",//消息类型 "data": { "avatar"://名片好友的头像 "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7iacKVM6aze3F0SPkpLmibaxwff0CfE338L6PzpHoZ2rxw/0", "nickname":"C奕",//名片好友的微信昵称 "user_id":"788130132420XXXX",//名片好友的微信id "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "local_id":"0", "receiver":"788130083907XXXX",//接收名片消息方(客户)的微信id "send_time":"1686746504", "sender":"168885435526XXXX",//发送名片消息方(登录企业微信)的企业微信id "server_id":"1047184",//企业微信服务端消息id "sendUserId":"apps-2",//光年账号id "sendUserName":"小小",//光年账号昵称 "isOpenApi":true,//若不是通过openAPI发送,就不会有这个字段 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"3e0a1e87-838d-4ec3-870f-3c685432edb5" }
小程序消息
type为 mini_program_msg
quntool端接收消息的回调如下:
{ "msgId":"13d3f9b0-3e9d-4e49-87db-b2e0b32ced49", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724492202, "type":"mini_program_msg",//消息类型 "data":{ "appicon": "http://mmbiz.qpic.cn/mmbiz_png/SGiaydYUe1zLtdMgrAcV9eon11wLWiaKVXCc4or8hLUDDpFGJDON50hYbPOs3UKHnDTnkePKBsbkeSicHAwIxu2Qg/640?wx_fmt=png&wxfrom=200", "appid":"wx8f98d076d3459dd6", "appinfo":"6801064353112384757", "appname":"雪球 App", "cdn": { "aes_key":"63616478726B75686B73746D6E657A70", "file_id": "306a02010204633061020100020458e1a00602031e90380204e7df892b020464895f8b0435313439313138313537345f3532383035303834325f62303336633563303434626537343664376137376364383838666232643036300201000203013ba004000201010201000400", "size":80799 }, "cdn_type":2, "content_type":78, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":0, "local_id":"1050", "page_path":"pages/fundIndex/public.html?sourceFrom=share", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686724489", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047057",//企业微信服务端消息id "thumb_height":504, "thumb_width":630, "title":"Hi 聪明的投资者,点击查看小雪今天为你精挑细选的基金内容", "username":"gh_7a080f2e543d@app",//小程序账号原始ID "cover_path": "/gnapi/files/Cache/20230614/4c9553c3046842a9a27307c02ebf771b/4fef8b63-1463-4a0d-a2de-6a75bbe1ec90.png" }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"7eec1bb2-7bf5-41b6-b5c1-d897313345d3", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724403033, "type":"mini_program_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686724402, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047054",//企业微信服务端消息id "appicon": "http://mmbiz.qpic.cn/mmbiz_png/SGiaydYUe1zLtdMgrAcV9eon11wLWiaKVXCc4or8hLUDDpFGJDON50hYbPOs3UKHnDTnkePKBsbkeSicHAwIxu2Qg/640?wx_fmt=png&wxfrom=200", "appid":"wx8f98d076d3459dd6", "appname":"雪球基金", "page_path":"pages/fundIndex/public.html?sourceFrom=share", "title":"Hi 聪明的投资者,点击查看小雪今天为你精挑细选的基金内容", "username":"gh_7a080f2e543d@app",//小程序账号原始ID "cover_path":"/gnapi/files/Storage/20230612/c76f3023d5534b91b2d809501b926f7c/6019ab5a-af91-430f-9e92-03f84cb1f84a.png", "cdn_type":0, "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"52e840a3-7376-44c1-8d70-019af2c2fd91" }
视频号消息
type为 video_num_msg
quntool端接收消息的回调如下:
{ "msgId":"8f888f04-24e0-4fb3-8f23-3b26acaf29fd", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686731274251, "type":"video_num_msg",//消息类型 "data": { "appinfo":"1729041739997290048", "avatar": "http://wx.qlogo.cn/finderhead/ver_1/MWlx8P1sq5RWaFRw0U5ZNC9bQNiarzMoa1GlC4LZm8PkYxhnHaVEl67ph9Hib8ibQ0X6DgoicjnD785L7GpC0Vj7Eqdovia2wKCTl7TrrtqAlkLE/0", "content_type":141, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "cover_url": "/gnapi/files/Cache/20230614/d3188abfe3494227ba5941674b5375b6/38684061-b380-40a3-9f47-25245d355b79", "desc": "三个男生在食堂吃饭的时候说猫拉屎太臭,隔壁桌女生一盘烤鸭饭盖头上,你怎么看?#不文明行为 #大学校园\n", "extras": "CAEQACL4GwAE9OmXBAAAAQAAAAAAdY71uU6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wutjOap2/xXdI8lehuJ+2+8guoaE5u+hxFB4WZTcedJaYv9zM89MJSXrX629mlyTdvAmAiTFqfdMyaERRtQlf9VoFAXEvfz38uoNh9EgUNxM+bBMjU9KtMSNvwGWFG1hZOuLsDcNgMZU2W5bc81nmJY6PB3OIv5CygG7K76rswQFUMmyE1LXLESCxwe8QdLKI/yOmYOx/SYvKUP7AkIrv0lzBaQI3qUmHWJJz1M5VLA4CSPKvAfJKM7lhFVGXOxNl9ybD518+rtGGQUUeBjwDG9lrFlnIYSRRA2vwzXAi1aXmuAhNAyePl/gw4jozYwqcvNm3vMkY5cBNA6RJEA4nzKp+cZtEbqIAJJNOpbfn+8TiSovrU6X9jyLlCPEVZPPExdF50zAzczXF1Ww2hXcn5mdXbd9M5ygA", "feed_type":4, "is_pc":0, "local_id":"1052", "nickname":"民生频道",//视频号博主的账号昵称 "object_id":"14149299402708355092", "object_nonce_id":"14419861684357443117_0_0_0_0_0", "receiver":"168885435526XXXX",//登录的企业微信id(接收消息方) "send_time":"1686731271", "sender":"788130083907XXXX",//客户的微信id(发送消息方) "sender_name":"左脚",//客户的微信昵称(发送消息方) "server_id":"1047067",//企业微信服务端消息id "thumb_url": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=rjD5jyTuFrIpZ2ibE8T7YmwgiahniaXswqzhVUZ7gvVz0gtzrbEWZSHVb4mwrTL8icEic5icpDjDFJxZ0b4nnibmlfJJuLVePeJtA3GfsJus2IN5XUokRVRWLLlAQ&bizid=1023&dotrans=0&hy=SH&idx=1&m=&scene=0&token=x5Y29zUxcibCojS6Q4K8RhX4AG0ibhk0ma2jHDmIfJs8bQRyZvDWSNuZ7ibm1yicaaUuJTl1rP0siaWc&finder_expire_time=1687336072&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAC8wCjV7dzwAAAAstQy6ubaLX4KHWvLEZgBPEwKMgRmJ2QMuHzNPgMILdmSSrRvHB3zTAfUJAF0Cb", "url": "https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAAC8wCjV7dzwAAAAstQy6ubaLX4KHWvLEZgBPEwKMgRmJ2QMuHzNPgMILdmSSrRvHB3zTAfUJAF0Cb" }, "sendMsgId":null }
quntool端发出消息的回调如下:
{ "msgId":"35819d5c-4913-4fa0-9466-3a508dd968bb", "source":"c0b764946118", "userId":"apps-1",//光年账号id "wxid":"168885435526XXXX",//登录的企业微信id "timestamp":1686724715559, "type":"video_num_msg",//消息类型 "data": { "content_type":0, "conversation_id":"S:168885435526XXXX_788130083907XXXX",//若是群聊则是R:群聊id "is_pc":1, "receiver":"788130083907XXXX",//客户的微信id(接收消息方) "send_time":1686724715, "sender":"168885435526XXXX",//登录的企业微信id(发送消息方) "server_id":"1047060",//企业微信服务端消息id "cover_url": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=rjD5jyTuFrIpZ2ibE8T7YmwgiahniaXswqzCgcgMgZB0jHoROIofx1xpKTuKzP0diaYhbibt4b0FNbbXncLXX9EJsic1azZMp5FehtXDWlvdjNqCTzBu40jfFAvg&bizid=1023&dotrans=0&hy=SH&idx=1&m=&scene=0&token=x5Y29zUxcibAUsQC4VxOxdOMNfxcHkpUa0qW9edVvDribjDibzzeZlmrJxLRIp7T6ibuTPWa1MN2SVY&finder_expire_time=1684979674&finder_eid=export%2FUzFfAgtgekIEAQAAAAAANnUhyfVVbAAAAAstQy6ubaLX4KHWvLEZgBPE26NAdxBQfu-HzNPgMIKNzt_6bZd-mnaV_qwM7Kh0", "desc":"生于1992年,刘芳秀被查,参加工作不到9年,半年前刚刚履新", "feed_type":4, "nickname":"白鹭洲知政",//视频号博主的账号昵称 "thumb_url": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=rjD5jyTuFrIpZ2ibE8T7YmwgiahniaXswqzCgcgMgZB0jHoROIofx1xpKTuKzP0diaYhbibt4b0FNbbXncLXX9EJsic1azZMp5FehtXDWlvdjNqCTzBu40jfFAvg&bizid=1023&dotrans=0&hy=SH&idx=1&m=&scene=0&token=x5Y29zUxcibAUsQC4VxOxdOMNfxcHkpUa0qW9edVvDribjDibzzeZlmrJxLRIp7T6ibuTPWa1MN2SVY&finder_expire_time=1684979674&finder_eid=export%2FUzFfAgtgekIEAQAAAAAANnUhyfVVbAAAAAstQy6ubaLX4KHWvLEZgBPE26NAdxBQfu-HzNPgMIKNzt_6bZd-mnaV_qwM7Kh0", "url": "https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAANnUhyfVVbAAAAAstQy6ubaLX4KHWvLEZgBPE26NAdxBQfu-HzNPgMIKNzt_6bZd-mnaV_qwM7Kh0", "extras": "CAEQACK1HQAE9OmXBAAAAQAAAAAAoqzJlZqVWjGof1qFZWQgAAAAaeq5SzX7s7sPwaz04zCEwYwyALHFYGIb/l1etP1AtP3IuBqRDUqbd1L94E0VpKvSCbuTBNGhsZFa6KGOJvX6Z6U1/cuIYyMLRRnvK74fHoFwtuEIc3+/WH5ncYulXUZf+0HPoBhk4s2dCepkIHNckB76WPooMgzyojE1s7NRtS/3/QLSQ9WqU/ta79O01gWlOtcxxq/1UrSLLDYMY7ZsYCU2rTe9Q9Xotjsv1hjkQUaBQyyf9xEColM6S9qkJvyqawgLr4Q1qkP3kToxuj5Z/Ae1gQGHuCgegfmme/DAbJDjj2M0tSJqES0lIDTeONth2ORqKY9k/aK5ggTEHGXjQu6LOlmJbAIu3Z7t05CbSATJ/fzFBIgqRxx4uEZCwJwXB8iv68+0gc0TNmZY1ZLrmBLF/kUFkMA0CeqCPBKC1sL4dQb9sFlgKbw8YIQOwfYyl0QIWeUnMhTRJHw2GcvYx+TW15qu7OlcDR9ogdfizSBIR7BsTahMX/VMknNUB2P8BQUYmZw9AFloqdIeUF1n1vRQ5iTRFUqW5Hxim39AtirisJobO3aKaabSU9o4NG0Rj5TBISSJRrnil1egAVARZYy+cD3jHvogZRh5KFl4sLfTQWaMI55E3AYonNictmcB2vL4APfai1O738gS6nd+utU5tE390m+qRmje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avatar":"http://wx.qlogo.cn/finderhead/ver_1/DleFWMGHW8JD69j5r5icATCYHibROSKPSTWVJhomDGTWu3YniaEyOaP81Nl1iaN2SafCs31AprQQQeVibFmOM1T75o1EVlK9O3EPjTP4kW9qNiajQ/0", "sendUserId":"apps-1",//光年账号id "sendUserName":"眠羊",//光年账号昵称 "error_code":-1000999,//发送失败错误码,0表示发送成功 "error_message":"Abnormal request frequency"//发送失败错误原因 }, "sendMsgId":"8a5b70ea-130b-4c9f-9c2e-ec5f22801d6c" }
有新的联系人被添加
💡有个别情况添加好友时不会有此回调:
1、客户没开启联系人验证时添加好友,
2、客户已经是企微的好友,但是企微不是客户的好友,此时添加好友,这些情况如果业务上需要处理,可以通过灰色字体消息进行判断
type为 notify_type_contact_add
{
"msgId":"a5ff6553-0312-41ec-beca-45a529cc31a4",
"source":"19c302e842b7",
"userId":"apps-2",
"wxid":"168885435526XXXX",
"timestamp":1686810153601,
"type":"notify_type_contact_add",
"data":
{
"acctid":"",
"avatar":
"http://wx.qlogo.cn/mmhead/Q3auHgzwzM6XL416LZxSicbiaL1DSbBt5ppAPFAsDiaz9OMKYcKZB0ia5A/0",
"conversation_id":"S:168885435526XXXX_788130083907XXXX",
"corp_id":"1970325134026788",//(注意)这个是微信公司自己的corp_id(因为好友是微信用户,因此这个字段就是返回微信自己的)
"mobile":"",
"nickname":"",
"position":"",
"realname":"",
"remark":"",
"sex":1,
"unionid":"ozynqsoD1_oPAqiZn-aPxONW----",
"user_id":"788130083907XXXX",////微信好友的微信id
"username":"左脚"//微信好友的昵称
},
"sendMsgId":null
}
群成员新增通知
type为 notify_type_room_add_member
{
"msgId":"c74d3c89-5d09-4f46-bfad-d52b9d2a8d6f",
"source":"387c543b0c2e",
"userId":"apps-18776",
"wxid":"168885040790XXXX",
"timestamp":1686643115608,
"type":"notify_type_room_add_member",
"data":
{
"member_list":
[{"name":"卡卡","user_id":"788130083019XXXX"}],
"op_user_id":"168885040790XXXX",
"op_user_name":"XF",
"room_conversation_id":"R:1089670317297XXXX",
"room_name":"XF、卡卡、峰哥"
},
"sendMsgId":null
}
移除群成员通知
type为 notify_type_room_del_member
{
"msgId":"50374fdf-1bb5-4a2b-9c81-cd5bb0100b39",
"source":"387c543b0c2e",
"userId":"apps-18776",
"wxid":"168885040790XXXX",
"timestamp":1686643128643,
"type":"notify_type_room_del_member",
"data":
{
"member_list":
[{"name":"卡卡","user_id":"788130083019XXXX"}],
"op_user_id":"168885040790XXXX",
"op_user_name":"XF",
"room_conversation_id":"R:1089670317297XXXX",
"room_name":"XF、峰哥"
},
"sendMsgId":null
}
新群通知
type为 notify_type_room_create
{
"msgId":"aa1d3f19-1724-43ab-98ad-7b7929bff8e0",
"source":"28cca2a4c405",
"userId":"apps-1",
"wxid":"168885435526XXXX",
"timestamp":1686639336084,
"type":"notify_type_room_create",
"data":
{
"member_list":[
{"name":"依然","user_id":"788130125713XXXX"},
{"name":"左脚","user_id":"788130083907XXXX"}
],
"op_user_id":"168885435526XXXX",
"op_user_name":"YG",
"room_conversation_id":"R:1084994280507XXXX",
"room_name":"YG、左脚、依然"
},
"sendMsgId":null
}
群成员主动退群通知
type为 notify_type_room_member_quit
{
"msgId":"e3580af1-0e3b-42c5-8826-7bfe501ca6a9",
"source":"28cca2a4c405",
"userId":"apps-1",
"wxid":"168885435526XXXX",
"timestamp":1686642402411,
"type":"notify_type_room_member_quit",
"data":
{
"op_user_id":"168885040790XXXX",
"op_user_name":"XF",
"room_conversation_id":"R:1089075089950XXXX",
"room_name":"ASBG"
},
"sendMsgId":null
}
修改群名称通知
type 为 room_name_changed
{
"msgId":"c324524c-0ea1-4963-8c5a-decf74fe17c6",
"source":"6f2d8092bc47",
"userId":"apps-2",
"wxid":"168885435526XXXX",
"timestamp":1688985033339,
"type":"room_name_changed",
"data":
{
"op_user_id":"168885435526XXXX",
"room_conversation_id":"R:1070054722539XXXX",
"room_name":"井上拟声"//修改后的群名称
},
"sendMsgId":null
}
灰色字体消息
type 为 chat_gray_msg
💡 聊天消息中的灰色字体消息(如,被好友删除)
{
"msgId":"34a5b393-572e-49a6-a6af-6e49f73315d3",
"source":"19c302e842b7",
"userId":"apps-2",
"wxid":"168885435526XXXX",
"timestamp":1686801776923,
"type":"chat_gray_msg",
"data":
{
"appinfo":"CAUQo5ABGOLw4emLMSAC_need_verify",
"content":"左脚开启了联系人验证,你还不是他(她)的联系人。请先发送联系人验证请求,对方验证通过后,才能聊天。 发送联系人验证",
"content_type":1011,
"conversation_id":"S:168885435526XXXX_788130083907XXXX",
"is_pc":0,
"receiver":"788130083907XXXX",
"send_time":"1686801776",
"sender":"168885435526XXXX",
"sender_name":"",
"server_id":"1047330"
},
"sendMsgId":null
}
企微登录回调
type 为 user_login
{
"msgId":"5d37ca1c-e09c-45f0-9d22-1549d15ef402",
"source":"c0b764946118",
"userId":"apps-1",
"wxid":"168885435526XXXX",
"timestamp":1686725141632,
"type":"user_login",
"data":{
"account":"yG@gnlab.com",
"acctid":"yG",
"avatar":"https://wework.qpic.cn/wwpic/875997_ZDuwMIeVQreLNqd_1685519387/0",
"corp_id":"197032505708XXXX",
"document_root":
"C:\\Users\\ContainerAdministrator\\Documents\\WXWork\\168885435526XXXX",
"email":"",
"job_name":"",
"mobile":"1825825XXXX",
"nickname":"",
"pid":36632,
"position":"",
"sex":1,
"user_id":"168885435526XXXX",
"username":"YNG"
},
"sendMsgId":null
}
企微离线回调
type 为 user_offline
💡当企业微信账号注销、用户在其他地方登录、异常退出时将收到此回调
{
"msgId":"28280d90-95fc-4292-8869-754a0b0111cf",
"source":"c0b764946118",
"userId":"apps-1",
"wxid":"168885435526XXXX",
"timestamp":1686725114075,
"type":"user_offline",
"data":null,
"sendMsgId":null
}
群发确认消息
type 为 batch_msg_confirm
💡收到群发确认消息后可以调用群发确认接口进行自动确认
{
"msgId":"34a5b393-572e-49a6-a6af-6e49f73315d3",
"source":"19c302e842b7",
"userId":"apps-2",
"wxid":"168885435526XXXX",
"timestamp":1686801776923,
"type":"batch_msg_confirm",
"data":
{
"appinfo": "KHGSC_1688850407900545_110739833202391153_n",
"content": "{\"main_title\":{\"title\":\"谢xx通知你群发消息给客户\"},\"button_list\":[{\"title\":\"发送\",\"interaction\":{\"type\":1002,\"url\":\"https://work.weixin.qq.com/wework_admin/common/uploadWework\",\"schema_desc\":{\"pc_schema_url\":\"wxwork://jump?target=jump_to_tool&toolid=10167007&msg_id=110739833202391153&send_type=0&conversation_type=0&isAllowSelect=0&refreshData=1\",\"mobile_schema_url\":\"wxwork://jump?target=jump_to_tool&toolid=10167007&msg_id=110739833202391153&send_type=0&conversation_type=0&isAllowSelect=0&refreshData=1\",\"min_version_mac\":\"4.0.12\",\"min_version_ios\":\"4.0.12\"}},\"is_link\":true,\"style\":33555256}],\"button_column\":1,\"card_action\":{\"type\":1002,\"url\":\"https://work.weixin.qq.com/wework_admin/common/uploadWework\",\"schema_desc\":{\"pc_schema_url\":\"wxwork://jump?target=jump_to_tool&toolid=10167006&msg_id=110739833202391153&send_type=0&send_customer_cnt=2&conversation_type=0&refreshData=1\",\"mobile_schema_url\":\"wxwork://jump?target=jump_to_tool&toolid=10167006&msg_id=110739833202391153&send_type=0&send_customer_cnt=2&conversation_type=0&refreshData=1\",\"min_version_mac\":\"4.0.12\",\"min_version_ios\":\"4.0.12\"}},\"quote_message\":{\"quote_list\":[\"你好\"]},\"data_refresh_action\":{\"refresh_interval\":3,\"data\":\"Chdncm91cF9zZW5kX2NhcmRfcmVmcmVzaBIVCPHwjqSqqdvEARCBi5GFgoCAAxgA\",\"cmd_id\":6238}}",
"sendtime": 1689755757,
"title": "谢XX通知你群发消息给客户"
},
"sendMsgId":null
}
接口调用
💡主动调用的API的地址统一为:http://{{聚合聊天访问地址}}/gnapi/open/{{path}},接口请求参数不区分大小写,注意路径中一定要有/open(太容易漏掉了)
登录
输入登录验证码
💡只有当回调消息类型qrcode_status_msg中data.status为10时才会用到此接口
POST /container/verify
请求例示:
{
"hostname":"12341241"//来自回调消息类型qrcode_status_msg中source字段
"key":"6E16C7042D0A4E832114E839EB1694CE",//来自回调消息类型qrcode_status_msg中data.qrcode_key字段
"code":"386317"//从手机企业微信官方app上获取,示例图如下
}
返回例示:
{
"data":{
"errcode":0,//若`errcode`小于0,就是用户输入有错 ,就需要重新输入正确验证码
"errmsg":"ok"
},
"code":0
}
登录企业微信
💡此接口会创建一个全新的企微登录环境,如果是下线后重新登录,请使用/container/start接口
POST /container/create
请求例示:
{
"userId": "apps-1"//通过获取流量超市账号列表接口获取
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"qrcode": "/gnapi/files/20220812/8bdbdd6087f0463db0494704f719bc47/88046e97-fef5-4db1-8804-7bd8dbb53658.jpg",
"hostname": "62a1263f977c",
"version": "1.3.0.13",
"createtime": "2022-08-12 15:56:14",
"wxPid": 57264
}
下线企业微信
💡下线后会释放企微所占用的内存及CPU资源占用,但不会删除硬盘上的企微缓存文件,下线后可以通过上线接口重新登录,不需要重新扫码
POST /container/stop
请求例示:
{
"hostname": ["23fewerf23d"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
上线企业微信
💡用于上线登出状态的企业微信
POST /container/start
请求例示:
{
"hostname": ["23fewerf23d"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
登出企业微信
💡登出会释放企微所占用的内存及CPU资源占用,且会删除硬盘上的企微缓存文件,需要重新扫码登录
POST /container/remove
请求例示:
{
"hostname": ["23fewerf23d"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
重启企业微信
💡重启后会释放企微所占用的内存及CPU资源占用
POST /container/restart
请求例示:
{
"hostname": ["23fewerf23d"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
获取企业微信列表
GET /inner/user/wx/list
请求参数:
- userId string quntool里登录的用户的id,用于筛选
- IsOnline bool 是否在线,默认为true,当传false时会返回系统中所有的企微,包括在线,离线和登出等状态
- HostName array 用于筛选
返回参数:
- Status int [0:在线] [1:离线] [2:登出] [3:正在登录] [4:登录失败,请重新扫码] [5:登录失败,请联系光年技术支持]
- QrCode string status为4时返回,用于重新扫码登录,通过此二维码登录,可以重用企微缓存文件,避免重新扫码登录时出现无法获取到个别很久没聊天的群列表等问题
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"hostname": "PC-20200805GOPM",
"wxId": "1688850407900545",
"userId": "internal-6",
"username": "xxx",
"nickname": "",
"avatar": "http://wework.qpic.cn/bizmail/fON3uGHibKLBoWGmHTtDZ1icIJiboib76VRSLrQQo7f3Nm2dSqvS7q3zXA/0",
"corp_id": "1970325057080574",
"corp_name": "",
"mobile": "18222222222",
"position": "",
"corp_short_name": "光年实验室",
"job_name": "",
"account": "",
"acctid": "XiedaFeng" //该企业微信的userid,与通过企业微信开放API获取的相同。
"Status": 0,
"QrCode":null
}
]
}
联系人
获取外部联系人列表
GET /contact/external/list
请求参数:
- wxId string 企业微信id
返回例示:
{
"code": 0,
"msg": "",
"data": [
{
"avatar": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4QzCpELF16JuPpMBAD3rhcqyAuhfJAKx7OKN73tib7e1g/0",
"conversation_id": "S:16888888888_16888888888",
"corp_id": "111",
"nickname": "",//只有企业微信用户才有的,别名
"position": "",
"realname": "",//只有企业微信用户才有的,实名认证的名字
"remark": "",//自己给好友备注的名字
"sex": 1,
"user_id": "168888",//微信用户78开头、企业微信用户16开头
"username": "xxx",//微信用户的微信昵称、or企业微信用户的姓名
"external_user_id":"",
"is_delete": true, // 是否删除了此联系人或被联系人删除
"delete_time": "2024-01-08 13:51:22", // 联系人删除的时间,未删除或不确定时间时为 null。
}
]
}
获取外部联系人的扩展信息
GET /contact/extendinfo
请求参数:
- wxId string 企业微信id
- ContactId string 客户id
返回例示:
{
"msg": "",
"code": 0,
"data": {
"corp_remark": "",//公司名称
"desc": "哈哈", //描述
"phone_list": [ //手机号列表
"235"
],
"remark": "",
"status": 1,
"user_id": "788130083019XXXX"
}
}
获取内部联系人列表
GET /contact/inner/list
请求参数:
- wxId string 企业微信id
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"avatar": "https://wework.qpic.cn/wwhead/duc2TvpEgSTPk74IwG7BsibtM6hc3nmj8e8o5Chc9G1kTYLBenKs6icmVlsLelFAsBJLyo0mIzPxY/0",
"conversation_id": "S:16888888888_16888888888",
"corp_id": "111",
"nickname": "xxx",
"position": "",
"realname": "xxx",
"remark": "",
"sex": 2,
"user_id": "16888888888",
"username": "xxx"
},
{
"avatar": "http://wework.qpic.cn/wwhead/duc2TvpEgSTPk74IwG7BszEC1NNLbZ0ht1icA9ewbZJJsA5jKsOuxT5uyjs8Mia6SibGJRCmdp01nQ/0",
"conversation_id": "S:16888888888_16888888888",
"corp_id": "111",
"nickname": "xxx",
"position": "",
"realname": "xxx",
"remark": "",
"sex": 2,
"user_id": "16888888888",
"username": "xxx"
}
]
}
}
修改内/外部联系人的备注
PUT /contact/remark
请求例示:
{
"wxId": "168888",
"contactId": "1688800000000",
"remark": "备注"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
修改内/外部联系人的描述
PUT /contact/desc
请求例示:
{
"wxId": "168888",
"contactId": "1688800000000",
"desc": "描述"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
修改内/外部联系人的电话
PUT /contact/phone
请求例示:
{
"wxId": "168888",
"contactId": "1688800000000",
"phones": ["18268181111","18268182222"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
删除好友
POST /contact/remove
请求例示:
{
"wxId": "168888",
"ContactUserId": "788xxxxxxxxx"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
查询客户
POST /contact/external/query
请求例示:
{
"ContactInfos": [
{
"WxId": "{{WxId}}",
"ContactUserId": "{{ContactUserId}}"
}
]
}
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"avatar": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM7GCgXgwoEBzQLkqugbbIphRgAPXBXIdNZN221AYMia6wA/0",
"conversation_id": "S:1688850407900545_7881300830190773",
"corp_id": "1970325134026788",
"nickname": "",
"position": "",
"realname": "",
"remark": "测试",
"sex": 2,
"user_id": "7881300830190773",
"username": "卡卡",
"external_user_id": null,
"is_delete": false,
"delete_time": "2023-08-09 18:41:57"
}
]
}
消息
💡企微官方对发送消息有频率限制,批量发送消息时需要控制好发送频率,否则消息会发送失败
- 每个企微发送消息间隔控制在500ms
- 每个企业一小时内所有企微发送消息数总和控制在50000条
发送文字消息
POST /msg/text
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
- content string 发送内容
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX",
"content":"你真的是又美又仙啊"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "ed1ba6c2-bbe1-4ec9-acd9-019533bb5b93"
}
}
发送群@消息
POST /msg/roomAt
💡只支持文本消息哦~
请求参数:
- wxId string 企业微信id
- conversationId string 群聊会话id
- content string 发送的内容
- atList array 用户id列表
请求例示:
{
"wxId": "16885343",
"conversationId": "R:11111111111",
"content": "你好,世界",//若指定位置@某人,如:"你好,世界{$@}、{$@}" 实际输出结果:你好,世界@微信昵称(168877的)、@微信昵称(168866的)
"atList": ["168877xxxxxx", "168866xxxxxx]//@所有人传["0"]
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "98f10652-001d-4a37-9b7a-c610c082eac5"
}
发送图片消息
POST /msg/image
请求参数:
- fileUrl string 要发送的图片地址,可直接传http开头的地址或通过文件上传接口获取
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
请求例示:
{
"fileUrl":"http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.jpg",
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "d45a7b3b-5b93-4f83-b3e4-ec77acfbb091"
}
}
发送文件消息
POST /msg/file
请求参数:
- fileUrl string 要发送的文件地址,可直接传http开头的地址或通过文件上传接口获取
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
请求例示:
{
"fileUrl":"http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.csv",
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "d45a7b3b-5b93-4f83-b3e4-ec77acfbb050"
}
}
发送gif动图消息
POST /msg/gif
💡超过5M的gif需要用文件消息接口(/msg/file )发送
请求参数:
- fileUrl string 要发送的gif动图地址,可直接传http开头的地址或通过文件上传接口获取
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
请求例示:
{
"fileUrl":"http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.gif",
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "d45a7b3b-5b93-4f83-b3e4-ec77acfbb043"
}
}
发送视频消息
POST /msg/video
💡视频大小不要超过50MB,否则腾讯那边会拦截掉
请求参数:
- fileUrl string 要发送的视频地址,可直接传http开头的地址或通过文件上传接口获取
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
请求例示:
{
"fileUrl":"http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.mp4",
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "d45a7b3b-5b93-4f83-b3e4-ec77acfbb069"
}
}
发送语音消息
POST /msg/voice
特别注意:这个接口尽量少调用,否则有封号风险
请求参数:
- fileUrl string 要发送的语音地址,可直接传http开头的地址或通过文件上传接口获取
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
- 语音文件必须是12000的采样率,播放长度不超过60s
请求例示:
{
"fileUrl":"http://software.gnlab.com/quntool/files/20221028/663eaa1e1cbd032f7ae6defed5a00720/0a9caa3fbfcf9186cad4a30c0eda0df.aac",
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "d45a7b3b-5b93-4f83-b3e4-ec77acfbb025"
}
}
发送名片消息
POST /msg/personCard
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
- personCardUserId string 要发送名片用户的 id
- nickName string 用户昵称
- avatar string 用户头像
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"S:168885435526XXXX_788130083907XXXX",
"personCardUserId":"788130132420XXXX",
"nickname":"C奕",
"avatar":"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7iacKVM6aze3F0SPkpLmibaxwff0CfE338L6PzpHoZ2rxw/0"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "6de2850f-05e2-473d-8323-34bb0a3eec1d"
}
}
发送链接消息
POST /msg/link
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
- title string 链接标题
- desc string 链接描述
- url string 链接地址
- imageUrl string 链接图片URL
请求例示:
{
"wxId": "168888",
"conversationId": "S:16888888888_16888888888",
"title" : "百度一下",//这个字段可是必填的(光空格输入也不行)
"desc": "用科技让复杂的世界更简单!",//非必填
"url" : "https://www.baidu.com",
"imageUrl" : "http://www.xxx.com/xxx.jpg"//非必填
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "9e8aec1f-c554-4ee9-bab5-ee4b94c78904"
}
}
发送小程序消息
POST /msg/miniProgram
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
以下参数在接收小程序消息回调中获取
- username stirng
- appid string
- appname string
- appicon string
- title string
- page_path string
- cover_path string
请求例示:
{
"wxId": "{{WxId}}",
"conversationId": "{{ConversationId}}",
"username":"gh_72a4eb2d4324@app",
"appid":"wx2c348cf579062e56",
"appname":"美团外卖丨外卖美食奶茶咖啡水果",
"appicon":"http://wx.qlogo.cn/mmhead/Q3auHgzwzM5hquVCXs3GGoLibFceAyGqMjKcBGw85hXwBQh0woJAcqg/96",
"title":"美团外卖,送啥都快",
"page_path":"pages/index/index.html?from=from_share_index&",
"cover_path":"/gnapi/files/Cache/20230512/ba3a5098906a40ccbd168f135bf4b53c/c2851ccf-c8a6-47f4-b592-99b52b95c934.png"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "e997789e-30d5-4e6a-825d-dc8934f53528"
}
}
发送视频号消息
POST /msg/videoNum
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
以下参数在接收小程序消息回调中获取
- cover_url string
- desc string
- feed_type int
- nickname string
- thumb_url string
- url string
- extras string
- avatar string
请求例示:
{
"wxId": "{{WxId}}",
"conversationId": "{{ConversationId}}",
"cover_url":"http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=WTva9YVXqXcSUicrMCercmDHmKYPBXC7euPzGMqPKjscHtm1KnlRlmKkAicRHstVDoFcFuUOtSjYnUnk0RQrB9Bea6erfkjxPl9AqNoQYN7COWj1yvXibvwVMwv5iaQ1kgBQHfFRnVoKYf0&bizid=1023&dotrans=0&hy=SZ&idx=1&m=b35d03d80ac413536d97ec965f74c991&token=x5Y29zUxcibAhI1a41icfkqUQ9UkjXqcGicdWLVR9LhQ7RZCOhfJiadiad3GQicicgRQIrTS8TS3PFEujo&finder_expire_time=1684832838&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAqmUq57mPpgAAAAstQy6ubaLX4KHWvLEZgBPE9YNEYDAlA-KHzNPgMILXYoaO-ZG5j7tWly9g3i9_",
"desc":"你们要的原声版来了#碰拳惊喜挑战",
"feed_type":4,//默认的值
"nickname":"唐瑜熙",//视频号博主昵称
"thumb_url":"http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=WTva9YVXqXcSUicrMCercmDHmKYPBXC7euPzGMqPKjscHtm1KnlRlmKkAicRHstVDoFcFuUOtSjYnUnk0RQrB9Bea6erfkjxPl9AqNoQYN7COWj1yvXibvwVMwv5iaQ1kgBQHfFRnVoKYf0&bizid=1023&dotrans=0&hy=SZ&idx=1&m=b35d03d80ac413536d97ec965f74c991&token=x5Y29zUxcibAhI1a41icfkqUQ9UkjXqcGicdWLVR9LhQ7RZCOhfJiadiad3GQicicgRQIrTS8TS3PFEujo&finder_expire_time=1684832838&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAqmUq57mPpgAAAAstQy6ubaLX4KHWvLEZgBPE9YNEYDAlA-KHzNPgMILXYoaO-ZG5j7tWly9g3i9_",
"url":"https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAAqmUq57mPpgAAAAstQy6ubaLX4KHWvLEZgBPE9YNEYDAlA-KHzNPgMILXYoaO-ZG5j7tWly9g3i9_",
"extras":"CAEQACKVRAAE9OmXBAAAAQAAAAAA8pOa6K2+Hf1y8OwzY2QgAAAAaeq5SzX7s7sPwaz04zCEwYwyALHFYGIb/l1etP1AtP2hKZdmFZsMRkpMhnp/EDB7SExCKkfs88yIUZJm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RyrZs9u7TJYOoI0HLe2VyBuY6nJSxrSLO90PMft9Ay/8r3vb5S6fpohLQ3T3VJqVEApQyOGh/+S8eHkw7Ao26n2fPnXBlKCLK1ZYl0rx6S0S2V+2nb9sys96EbGXOr8hAIqo6apRqP8yaavDEJZYEb9gieWwPi4q+GAwIei+Clwtjiq8ortRYIlqf9xTGPDzxHFhI2YAUdNxPIi87z1tgZUv7hsaSTQFS+ERIOt4cSyaOXUJ7EytC9y0G3hGmkWLgHIBiuoyTrC8yvy+GNc3qPuUmZcGU1UqzJCDId+n6U8QH4Aeu0mmPFUlYh8T12/vxD6wSzdU46PU6jq4ZL/pw6kTY6izcX/DJgb220psipp6HzZ3Rg0rbFR0RE0S3KXc8nDu2ARuxJIZsOyLNBUVdskpjIHoZC4TrFUBt77b2bhcS1ShCW9S5HEYCY9LsxlT6Mm5mQOE+F6JdUlkVThYkjI6P7YGXS/i0tdsq8t/McouNImB8Um5wtpHC0omZ1AsNkkzCyghzDFSR/lPs7RNZ9sD9XP/iiltYubhmySpLmo+ZHnarRUOYIZON+IAlk5G6T66nMYAcZordoScRrdf3AQ3lUsKT9Z56rwYppvUcMcMc2BTrtqJDt5sI16fgVZH/XkrI2hrUKl4ZwzdpdZusFBIMi6tjaa+ZKhDJN4+ntX360+B9wvIt4J+soAA==",
"avatar":"http://wx.qlogo.cn/finderhead/ver_1/icZqRicJMAqNSpEfImvWQP9jdZQDhicuwTJx0q7Upz87ias9U4YUVibSMCUkdicgZXJKltHoLINmC5tujNydNCTUictAX5icpZrGcBsdAuvWbwdNyn0/0"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "804c3300-2228-419d-9ebb-0186dd1af853"
}
}
发送引用(回复)消息
💡已知能被引用的消息类型:文本、图片、视频、文件、语音、链接卡片、表情(gif)、小程序、视频号、地理位置等
POST /msg/quote
请求参数:
- wxId string 企业微信id
- conversationId string 会话id
- content string 发送的内容
- serverId string 被引用的消息的回调消息中的server_id字段
- quote string 被引用的消息的内容,该字段不传也能发送,传了可以在回调消息中获取到被引用消息的内容
请求例示:
{
"wxId": "{{WxId}}",
"conversationId": "S:168885435526XXXX_788130083907XXXX",//若是在群里,则传"R:1081621798894XXXX"
"content": "我很好",
"serverId":"1107070",
"quote":"安坚实:\n你好吗?"//若是图片、视频、文件等类型的传"昵称:\n[图片]"、"昵称:\n[视频]"、"昵称:\n[文件]"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "98f10652-001d-4a37-9b7a-c610c082eac5"
}
群聊
创建群聊
POST /group
请求参数:
- wxId string 企业微信id
- memberWxIds string 不需要包含自己的微信id,至少需要传两个其他用户的微信id,多个用英文逗号隔开
请求例示:
{
"wxId":"168885435526XXXX",
"memberWxIds":"788130083907XXXX,788130125713XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"createruin": "168885435526XXXX",
"createtime": 1686043629,
"error_code": 0,
"error_message": "",
"failmem": [
{
"type": 0,
"vid": 0
}
],
"msgid": 1045145,
"msgseq": "8594107",
"roomid": "1089985527713XXXX",
"roomname": "",
"sessionid": "R1lmUUxlaDhSRHFiX3pIeA==",
"success_add_vidlist": [
{
"success_add_vidlist": "788130125713XXXX"
},
{
"success_add_vidlist": "788130083907XXXX"
}
]
}
}
获取群聊列表
GET /group/list
请求参数:
- wxId string 企业微信id
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"wx_id": null,
"conversation_id": "R:1069605210003XXXX",
"create_time": 1632463343,
"create_user_id": "168885108699XXXX",
"is_external": 1,
"nickname": "衄恧",
"is_admin": 0,
"is_creator": 0,
"total": 6
}
]
}
}
修改群聊名称
PUT /group/name
请求参数:
- wxId string 企业微信id
- conversationId string 群聊id
- name string
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"R:1089985527713XXXX",
"name":"PK赛第五场"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
获取群聊成员列表
GET /group/member/list
请求参数:
- wxId string 企业微信id
- conversationId string 群聊id
返回例示:
{
"msg": "",
"code": 0,
"data": {
"conversation_id": "R:1075190747989XXXX",
"member_list": [
{
"acctid": "Feng",
"avatar": "https://wework.qpic.cn/wwpic/678939_GlpKyxZORneIsEs_1682306909/0",
"corp_id": "197032505708XXXX",
"invite_user_id": "168885040790XXXX",
"is_admin": 0,
"join_scene": 1,
"join_time": 1684230790,
"mobile": "182XXXX33XX",
"nickname": "",
"position": "",
"realname": "XX",
"remark": "",
"room_nickname": "",
"sex": 1,
"unionid": "ozynqsh65F9Rb6HF8Gu0hWp-----",
"user_id": "168885040790XXXX",
"username": "XX"
},
{
"acctid": "Gen",
"avatar": "https://wework.qpic.cn/wwpic/607412__EJlL2thQRSlhtT_1684339819/0",
"corp_id": "197032505708XXXX",
"invite_user_id": "168885435526XXXX",
"is_admin": 0,
"join_scene": 1,
"join_time": 1684233277,
"mobile": "159XXXX94XX",
"nickname": "",
"position": "",
"realname": "XA",
"remark": "",
"room_nickname": "",
"sex": 1,
"unionid": "ozynqsnI-i7xLVc-cNjLshU-----",
"user_id": "168885041205XXXX",
"username": "XA"
}
],
"page_num": 1,
"page_size": 100000,
"total": 2,
"total_page": 1
}
}
群聊批量添加成员
POST /group/member
请求参数:
- wxId string 企业微信id
- conversationId string 群聊id
- memberWxIds string 要添加的用户的微信id,多个用英文逗号隔开
特别提示:内部群只能邀请员工,否则即使接口返回成功,实际拉不进群的
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"R:1081621798894XXXX",
"memberWxIds":"788130083907XXXX,788130125713XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
群聊批量移除成员
DELETE /group/member
请求参数:
- wxId string 企业微信id
- conversationId string 群聊id
- memberWxIds string 要添加的用户的微信id,多个用英文逗号隔开
特别提示:只有群主或者管理员才可以,否则即使接口返回成功,实际不会移除的
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"R:1089985527713XXXX",
"memberWxIds":"788130083907XXXX,788130125713XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
添加群聊成员为联系人
POST /group/member/contact
请求参数:
- wxId string 企业微信id
- conversationId string 群聊id
- memberWxId string 要添加的用户的微信id
- verify string 验证信息
请求例示:
{
"wxId":"168885435526XXXX",
"conversationId":"R:1081621798894XXXX",
"memberWxId":"788130253621XXXX",
"verify":""
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
发布群公告
POST /group/notice
💡只有群主或管理员才能发布群公告
请求参数:
- WxId string 企业微信id
- ConversationId string 群聊id
- Content string 公告内容
请求例示:
{
"ConversationId": "{{RoomConversationId}}",
"Content": "这是群公告",
"Wxid": "{{WxId}}"
}
返回例示:
{//若普通成员发布群公告,接口也是此返回结果,但实际是发布了的
"msg": "",
"code": 0,
"data": null
}
开放平台双向互通
788ID 转 wm ID
POST /contact/externalUserId
请求参数:
- WxId string 客户所属的企业微信账号
- ContactUserId string 被查询客户的 788 ID
请求例示:
{
"WxId": "168885040757XXXX",
"ContactUserId": "788129953392XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ExternalUserId": "wm_oweDQAAdyk01RhjkTkYEw9HG-----"
}
}
POST /contact/externalUserIdFromDb
请求参数:
- WxId string 客户所属的企业微信账号
- ContactUserId string 被查询客户的 788 ID
- 该函数从数据库中查询对应关系 , 如果数据库中无此数据返回 ""
请求例示:
{
"WxId": "168885040757XXXX",
"ContactUserId": "788129953392XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ExternalUserId": "wm_oweDQAAdyk01RhjkTkYEw9HG-----"
}
}
wm ID 转 788ID
POST /contact/contactUserId
请求参数:
- WxId string 客户所属的企业微信账号
- ExternalUserId string 被查询客户的 wm ID
请求例示:
{
"WxId": "168885040757XXXX",
"ExternalUserId": "wm_oweDQAAdyk01RhjkTkYEw9HG-----"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ContactUserId": "788129953392XXXX"
}
}
POST /contact/contactUserIdFromDb
请求参数:
- WxId string 客户所属的企业微信账号
- ExternalUserId string 被查询客户的 wm ID
- 该函数从数据库中查询对应关系 , 如果数据库中无此数据返回 ""
请求例示:
{
"WxId": "168885040757XXXX",
"ExternalUserId": "wm_oweDQAAdyk01RhjkTkYEw9HG-----"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ContactUserId": "788129953392XXXX"
}
}
RoomId 转 wr ID
POST /group/externalRoomId
请求参数:
- WxId string 客户所属的企业微信账号
- RoomId string 被查询群的 RoomId
请求例示:
{
"WxId": "168885040757XXXX",
"RoomId": "R:1089265998532XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ExternalRoomId": "wr-h7tCwAAf4a0LRnMTXX6v_IDe-----"
}
}
wr ID 转 RoomId
POST /group/RoomId
请求参数:
- WxId string 客户所属的企业微信账号
- ExternalRoomId string 被查询客户的 wr ID
请求例示:
{
"WxId": "168885040757XXXX",
"ExternalRoomId": "wr-h7tCwAAf4a0LRnMTXX6v_IDe-----"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"RoomId": "R:1089265998532XXXX"
}
}
外部联系人ID互查
- 需要用到UnionId时才使用此接口,否则直接使用上述的转换接口即可
- 本接口在打通ContactUserId、ExternalUserid、UnionId的基础上提供ID互查能力,需要提前在web.config中配置WxApiConfig参数
GET /contact/relation
请求参数:
- wxId string 被查询客户所属的企业微信账号
- ContactUserId string 被查询客户的userid,可不传(微信联系人为788开头,企业微信联系人以1688开头)
- ExternalUserId string 被查询客户在当前主体下的ExternalUserid,可不传(微信联系人以wm开头,企业微信联系人以wo开头)
ContactUserId、ExternalUserId不可同时为空
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ContactUserId": "788130125713XXXX",
"ExternalUserId": "wm-h7tCwAAcXvFjZmG56H6cLRwh-----",
"CorpId": "wwb2621311fb78XXXX",
"CorpIdOrigin": "197032503706XXXX",
"UnionId": "oVDY6wYqL_Qbzib6EBCMQ1Q-----",
"AddWay": 0,
"State": null,
"CreateTime": "2022-06-20 18:35:24",
"AddWayDesc": "未知来源",
}
}
同步联系人ExternalUserid
- 需要用到UnionId时才使用此接口,否则直接使用上述的转换接口即可
- 新增用户的ExternalUserid会自动进行同步,但是偶尔会同步失败,此时可以通过此接口进行同步
POST /contact/relation/sync
请求参数:
- wxId string 被查询客户所属的企业微信账号
- ContactUserId string 被查询客户的userid(微信联系人为788开头,企业微信联系人以1688开头)
请求例示:
{
"wxId":"168885435526XXXX",
"ContactUserId":"788130125713XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"ContactUserId": "788130125713XXXX",
"ExternalUserId": "wm_oweDQAAkJuCL7-ajuoe_xSA_-----",
"CorpId": "wwe634f9fc91f0XXXX",
"CorpIdOrigin": "197032505708XXXX",
"UnionId": "oVDY6wYqL_Qbzib6EBCMQ1Q-----",
"AddWay": 0,
"State": null,
"CreateTime": "2022-06-20 18:35:24",
"AddWayDesc": "未知来源",
"Name": "依然小只眠羊",
"Avatar": "http://wx.qlogo.cn/mmhead/nibxxlib1VaPeQ6XS2j5y8iaGNK1cZSSn1thv2H4Xhv7p4LajLDXDf48Q/0"
}
}
标签
获取企微所有标签
GET /label/all
请求参数:
- wxId 企业微信的id
请求例示:
http://10.168.10.143/gnapi/open/label/all?wxId={{WxId}}
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"corpId": "1970325057080574",
"name": "test-6",
"labelId": "14073749589745780",
"labelGroupId": "14073749082601531",//0则是分组
"dataType": 0,
"labelType": 2,//标签类型:1公司2个人
"sortOrder": 0,//排序标识
"business": 0,//业务类型
"createTime": 1666249551//创建时间
}
]
}
给指定客户打标签
💡此接口也可以用来新增、替换、清除客户标签
1,若已打标签A_id,需要再打上标签B_id,则传参["A_id","B_id"]
2,若已打标签A_id,需要把标签A_id替换成标签B_id,则传参["B_id"]
3,若清除给该用户打的所有标签,则传参[]
POST /label/contact/setlabel
请求参数:
- contactUserId string 客户的ID
- labelIds string[] 标签ID,可通过获取企业下所有标签接口获取
- wxId string 客户添加的企业微信的ID
请求例示:
{
"labelIds": ["14073752508789570","14073750369750723","14073752508789848"],
"contactUserId": "78813008390XXXXX",
"wxId": "168885552743XXXX"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
获取指定客户的标签
GET /label/contact/labels
请求参数:
- wxId string 客户所在的企业微信ID
- contactUserId string 客户的ID,通常以 788 开头
请求例示:
http://10.168.10.143/gnapi/open/label/contact/labels?wxId=168885040757XXXX&contactUserId=788129953392XXXX
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"name": "房地产",
"label_id": "14073751020663697"
},
{
"name": "私域回答",
"label_id": "14073752873630633"
}
]
}
根据标签搜索用户
POST /label/contact/search
请求参数:
- labelIds []string 标签ID,可通过获取企微所有标签接口获取
- wxids []string 客户所在的企业微信ID
- PageIndex int 第n页 从1开始
- PageSize int 每页n条
请求例示:
{"wxids":["xxx"],"labelIds":["xxx"],"PageIndex":1,"PageSize":100}
返回例示:
{
"msg": "",
"code": 0,
"data": [{
"wx_id": "xx",
"user_id": "xx",
"conversation_id": "S:xx_xx",
"avatar": "xxx",
"corp_id": "xx",
"desc": "",
"external_job": null,
"nickname": "",
"position": "",
"username": "xx",
"realname": "",
"remark": "",
"sex": 1,
"is_delete": false,
"delete_time": null,
"LastChatTimestamp": 1709711349450,
"LastChatMsg": "",
"NewMsgCount": 0,
"WarnMsg": {}
]
}
获取指定标签下的客户
GET /label/contacts
请求参数:
- labelId string 标签ID,可通过获取企微所有标签接口获取
- wxId string 客户所在的企业微信ID
请求例示:
http://10.168.10.143/gnapi/open/label/contacts?labelId=14073751020663697&wxId=1688850407570384
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"avatar": "http://wx.qlogo.cn/mmhead/yXKobejm7F0H0ukv0gqDWBZCicuGFE9sWCZ3iaf7iafFJc/0",
"conversation_id": "S:168885040757XXXX_788129953392XXXX",
"corp_id": "1970325134026788",//微信那边的企业id(忽略)
"nickname": "",
"position": "",
"realname": "",
"remark": "",
"sex": 1,
"user_id": "788129953392XXXX",//客户的微信id
"username": "廖xx",//客户的微信昵称
"external_user_id": "wm_oweDQAAdyk01RhjkTkYEw9HGgXXXX"
}
]
}
其他
获取光年实验室账号列表
GET /inner/user/list
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"id": "apps-2XXXX",
"username": "昵称",
"createdAt": "2023-01-05 06:09:19",
"phone": null,
"avatar": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83er3lCVkGuwNYfh0jq5micfk2PCJWQ6k0yic4lCpnZEOgd2icmNDg9e26CVjYzOHK18HS9yA45tFzL0iag/132",
"Permissions": [
2
],
"IsAdmin": false,//false则为子账号,true为主账号
"Remark": ""
},
{
"id": "apps-1XXXX",
"username": null,
"createdAt": "2020-12-21 08:18:16",
"phone": "182XXXX33XX",
"avatar": null,
"Permissions": [],
"IsAdmin": true,
"Remark": null
}
]
}
通过手机号搜索微信联系人信息
GET /contact/search
请求参数:
- wxId string 发起搜索的企业微信账号
- keyword string 要搜索的手机号
返回例示:
{
"msg": "",
"code": 0,
"data": {
"contact_info": {
"acctid": "",
"alias": "",
"attr": "1507392",
"bind_email": "",
"bind_email_status": 1,
"birthday": "1970-01-01 00:00:00",
"bizuin": 0,
"circle_language": 0,
"corpid": "197032496598XXXX",
"create_source": 1,
"create_time": 0,
"department": "",
"display_order": "0",
"emailaddr": "",
"english_name": "",
"extern_job": "",
"extern_position": "",
"external_corp_info": "",
"external_pb": "",
"external_wxfinder": {},
"extra_info": {},
"gender": 1,
"gid": "2251803274712473",
"hash": 0,
"holiday_info": {
"create_time": 0,
"holiday_desc": "",
"holiday_generate_src": 0,
"holiday_icon_index": 0,
"holiday_info_id": "0",
"holiday_status": 0,
"holiday_status_new": 0,
"new_holiday_icon_index": 0
},
"holiday_list_read_time": 0,
"iconurl": "https://wework.qpic.cn/wwpic/980318_JLUQBkw4S_ycO75_1661150826/0",
"internation_code": "86",
"is_name_verified": true,
"job": "",
"level": 0,
"main_partyid": "168885434427XXXX",
"mobile": "",
"name": "**雨",
"name_status": 1,
"nation_code": "",
"number": "",
"openkfprofile": {},
"partyid": 0,
"partymember_order": 0,
"personal_work_type": 0,
"phone": "",
"position": "",
"pstn_extension_number": "",
"pstn_extension_number_new": "",
"qqmail_uin": 0,
"realname": "**雨",
"robot_profile": {},
"school_parent_openid": "",
"school_staff_relation": "",
"school_user_type": 0,
"staff_attr": 0,
"staff_type": 0,
"staff_xid": 0,
"student_number": "",
"subjectname": "",
"tencent_info": {
"work_card_image": ""
},
"uin": "168885126910XXXX",
"under_verify_name": "",
"unionid": "ozynqsk1W61bIMeecJFRPjv-----",
"use_attr2": "536870912",
"v_corp_name_full": "",
"v_corp_name_short": "",
"v_corp_use_status": 1000,
"v_create_mail": "",
"v_hoster_vid": "0",
"v_is_init_moder": true,
"v_recommend_info": {},
"vcode": "",
"xcx_corp_address": "",
"xcx_style": 0
},
"corpinfo": {
"admin_vid": 0,
"appli_info": {},
"auth_time": 0,
"authed_domain": "",
"b_authed_licence": false,
"b_has_info_corp": false,
"b_hastoken": false,
"b_internet_industry": false,
"b_need_not_verify": false,
"b_need_update_name": false,
"card_url": "",
"coreate_source_info": "",
"corp_desc": "",
"corp_full_name": "",
"corp_logo": "",
"corp_name": "",
"corp_stat": 0,
"corp_use_status": 0,
"corpid": "0",
"create_time": 0,
"custom_check_url": "",
"email_need_auth": "",
"internation_code": "",
"isAccepted": false,
"isTrust": false,
"is_corp_verify": false,
"is_init_moduser": false,
"is_overseas_corp": false,
"join_need_verify": false,
"language": 0,
"mail": "",
"mem_appli_time": 0,
"mem_create_time": 0,
"mobile_need_auth": "",
"moduser_info": {},
"ownername": "",
"personal_work_info": "",
"personal_work_type": 0,
"pstn_main_number": "",
"pstn_officephone_state": 0,
"qyh_info": "",
"scorp_id": "",
"staff_info": {},
"staffnum": 0,
"status": 0,
"unreadNum": 0,
"v_init_domain_name": "",
"v_superadmin_name": "",
"v_superadmin_vid": 0,
"verify_msg": "",
"verify_submit_time": 0,
"vid": 0,
"virtual_can_change_full_name": false,
"virtual_corp_claiming_name": "",
"work_card_back_url": "",
"work_card_face_url": ""
},
"datalist": [
{
"contact_info": {
"acctid": "",
"alias": "",
"attr": "1507392",
"bind_email": "",
"bind_email_status": 1,
"birthday": "1970-01-01 00:00:00",
"bizuin": 0,
"circle_language": 0,
"corpid": "197032496598XXXX",
"create_source": 1,
"create_time": 0,
"department": "",
"display_order": "0",
"emailaddr": "",
"english_name": "",
"extern_job": "",
"extern_position": "",
"external_corp_info": "",
"external_pb": "",
"external_wxfinder": {},
"extra_info": {},
"gender": 1,
"gid": "225180327471XXXX",
"hash": 0,
"holiday_info": {
"create_time": 0,
"holiday_desc": "",
"holiday_generate_src": 0,
"holiday_icon_index": 0,
"holiday_info_id": "0",
"holiday_status": 0,
"holiday_status_new": 0,
"new_holiday_icon_index": 0
},
"holiday_list_read_time": 0,
"iconurl": "https://wework.qpic.cn/wwpic/980318_JLUQBkw4S_ycO75_1661150826/0",
"internation_code": "86",
"is_name_verified": true,
"job": "",
"level": 0,
"main_partyid": "168885434427XXXX",
"mobile": "",
"name": "**雨",
"name_status": 1,
"nation_code": "",
"number": "",
"openkfprofile": {},
"partyid": 0,
"partymember_order": 0,
"personal_work_type": 0,
"phone": "",
"position": "",
"pstn_extension_number": "",
"pstn_extension_number_new": "",
"qqmail_uin": 0,
"realname": "**雨",
"robot_profile": {},
"school_parent_openid": "",
"school_staff_relation": "",
"school_user_type": 0,
"staff_attr": 0,
"staff_type": 0,
"staff_xid": 0,
"student_number": "",
"subjectname": "",
"tencent_info": {
"work_card_image": ""
},
"uin": "168885126910XXXX",
"under_verify_name": "",
"unionid": "ozynqsk1W61bIMeecJFRPjv-----",
"use_attr2": "536870912",
"v_corp_name_full": "",
"v_corp_name_short": "",
"v_corp_use_status": 1000,
"v_create_mail": "",
"v_hoster_vid": "0",
"v_is_init_moder": true,
"v_recommend_info": {},
"vcode": "",
"xcx_corp_address": "",
"xcx_style": 0
},
"contact_info_wx": {
"acctid": "",
"alias": "",
"attr": 0,
"bind_email": "",
"bind_email_status": 0,
"birthday": "",
"bizuin": 0,
"circle_language": 0,
"corpid": 0,
"create_source": 0,
"create_time": 0,
"department": "",
"display_order": 0,
"emailaddr": "",
"english_name": "",
"extern_job": "",
"extern_position": "",
"external_corp_info": "",
"external_custom_info": {},
"external_pb": "",
"external_wxfinder": {},
"extra_info": {},
"gender": 1,
"gid": 0,
"hash": 0,
"holiday_info": {},
"holiday_list_read_time": 0,
"iconurl": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM5xZfxRu9xqqHjAKMR7LvcoicrBL2KKaHtEoKibF5ocORKA/0",
"internation_code": "",
"is_name_verified": false,
"job": "",
"level": 0,
"main_partyid": 0,
"mobile": "",
"name": "我不知道",
"name_status": 0,
"nation_code": "",
"number": "",
"openkfprofile": {},
"partyid": 0,
"partymember_order": 0,
"personal_work_type": 0,
"phone": "",
"position": "",
"pstn_extension_number": "",
"pstn_extension_number_new": "",
"qqmail_uin": 0,
"realname": "",
"robot_profile": {},
"school_parent_openid": "",
"school_staff_relation": "",
"school_user_type": 0,
"self_info": {},
"staff_attr": 0,
"staff_type": 0,
"staff_xid": 0,
"student_number": "",
"subjectname": "",
"tencent_info": {},
"uin": "788129964699XXXX",
"under_verify_name": "",
"unionid": "",
"use_attr2": 0,
"v_corp_name_full": "",
"v_corp_name_short": "",
"v_corp_use_status": 0,
"v_create_mail": "",
"v_hoster_vid": 0,
"v_is_init_moder": false,
"v_recommend_info": {},
"vcode": "",
"xcx_corp_address": "",
"xcx_style": 0
},
"corpinfo": {
"admin_vid": 0,
"appli_info": {},
"auth_time": 0,
"authed_domain": "",
"b_authed_licence": false,
"b_has_info_corp": false,
"b_hastoken": false,
"b_internet_industry": false,
"b_need_not_verify": false,
"b_need_update_name": false,
"card_url": "",
"coreate_source_info": "",
"corp_desc": "",
"corp_full_name": "",
"corp_logo": "",
"corp_name": "",
"corp_stat": 0,
"corp_use_status": 0,
"corpid": "0",
"create_time": 0,
"custom_check_url": "",
"email_need_auth": "",
"internation_code": "",
"isAccepted": false,
"isTrust": false,
"is_corp_verify": false,
"is_init_moduser": false,
"is_overseas_corp": false,
"join_need_verify": false,
"language": 0,
"mail": "",
"mem_appli_time": 0,
"mem_create_time": 0,
"mobile_need_auth": "",
"moduser_info": {},
"ownername": "",
"personal_work_info": "",
"personal_work_type": 0,
"pstn_main_number": "",
"pstn_officephone_state": 0,
"qyh_info": "",
"scorp_id": "",
"staff_info": {},
"staffnum": 0,
"status": 0,
"unreadNum": 0,
"v_init_domain_name": "",
"v_superadmin_name": "",
"v_superadmin_vid": 0,
"verify_msg": "",
"verify_submit_time": 0,
"vid": 0,
"virtual_can_change_full_name": false,
"virtual_corp_claiming_name": "",
"work_card_back_url": "",
"work_card_face_url": ""
},
"flag": 0,
"item_type": 1,
"name": "",
"openid": "orFrbsiCQTREoLU5e7KC8vU-----",
"relation": 1,
"search_status": 1,
"wx_ticket": "4067A0FEC85A5C1B34A302B6758E91756DB1AF62AA72ACA7B------530FE5548DDAC55816A369E184F12BEA81549991032BFA0D02D8CA9C3B94B1B74EA20083CB8D80B99BF7546F191A93E3356354D3C"
}
],
"error_code": 0,
"error_message": "",
"flag": 0,
"keyword": "134XXXX80XX",
"name": "",
"relation": 1,
"search_status": 1
}
}
添加搜索到的联系人
POST /contact/search/add
请求参数:
- wxId string 添加好友的企业微信账号
- contactUserId string 用户id,/contact/search 接口返回的data.datalist[0].contact_info_wx.uin
(若加企业微信用户,用data.datalist[0].contact_info.uin)
- openid string ,/contact/search 接口返回的data.datalist[0].openid
- wxticket string ,/contact/search 接口返回的datalist中的data.datalist[0].wx_ticket
- verify string 验证消息
请求例示:
{
"wxId":"168885435526XXXX",
"contactUserId":"788130253621XXXX",
"openid":"orFrbspw4tbK44WmLw3fXVd-----",
"wxticket":"",//搜索接口返回的是空字符串,这里就传空字符串
"verify":"你好,通过搜索手机号找到您的,麻烦您通过一下哈"
}
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
查询在线企微内存占用
GET /container/memory
返回参数:
- Memory :占用内存,单位KB
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"WxId": "168885114944XXXX",
"UserName": "枫糖",
"HostName": "a87b5190b2a2",
"WxPid": 2256,
"Memory": 137324
},
{
"WxId": "168885040757XXXX",
"UserName": "YUOU",
"HostName": "3c693899cf0c",
"WxPid": 14356,
"Memory": 138228
},
{
"WxId": "168885056393XXXX",
"UserName": "IOUYH",
"HostName": "4e354f52ef94",
"WxPid": 39968,
"Memory": 153260
},
{
"WxId": "168885040762XXXX",
"UserName": "UYOOH",
"HostName": "2d9b66d489bd",
"WxPid": 45852,
"Memory": 120900
}
]
}
获取收藏的小程序列表
GET /miniprogram/list
返回参数:
- id long quntool中的小程序id,可通过此id发送小程序消息
- type int 0全员小程序1个人小程序
- internalPath string 存到本地的小程序logo,微信headimg个别网址有防外链功能
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"id": 7,
"username": "gh_f13a9ccf230b@app",
"appid": "wxa07672d4ed4d166a",
"appname": "多好APP",
"appicon": "http://mmbiz.qpic.cn/mmbiz_png/0joUEzY1oVcB8cJrPfp8DM5yr83TeJwUTejPoSDcjAyaiafPDAoiceeaodS75jO3yibuxzPgzglZeVACjRBt2rpicQ/640?wx_fmt=png&wxfrom=200",
"title": "Jason邀请你加入「多好」APP,一起分享靠谱的信息吧!",
"page_path": "pages/home/home.html?r=vz9qNQYrle",
"cover_path": "/gnapi/files/Cache/20230526/12e7349969ff4075a4d6d73e4e31247c/6b31e561-a32b-43b9-b83f-ab25b5653030.png",
"type": 1
}
]
}
通过id发送小程序消息
POST /miniProgram/send
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID,个人会话以S:开头,由企业微信id和接收人拼接而成,id小的排在前面,群聊会话以R:开头
- miniProgramId 小程序列表接口返回的id
请求例示:
{
"wxId": "168885040790XXXX",
"conversationId": "S:168885040790XXXX_788130195497XXXX",
"miniProgramId": 7
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "bbc61890-35a7-4d19-a100-365198d248a3"
}
}
获取收藏的视频号列表
GET /videonum/list
返回参数:
- id long quntool中的视频号id,可通过此id发送视频号消息
- type int 0全员视频号1个人视频号
- internalPath string 存到本地的小程序logo,微信headimg个别网址有防外链功能
返回例示:
{
"msg": "",
"code": 0,
"data": [
{
"id": 20,
"cover_url": "/gnapi/files/Storage/20230605/4f34402f67044e048fafa10e512e3073/f5f55172-51ca-46f6-9d63-db409c3e86b1",
"desc": "远离境外高薪诱惑,防止网络诈骗#提高警惕 #反诈宣传 #中国反诈中心",
"feed_type": 4,
"nickname": "通仔99",
"thumb_url": "http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLIBn9G5YG8ZnXpdvicTmPka7U4nAJzqoYIKyQL2seeMDqQUPhYdB9EfmGjYHnmy3Yuibx4nNDJcHfxaCVWEBOqvaB0JK710PJZgbib9NghwAvNMbPuFibhlEibh4&bizid=1023&dotrans=0&hy=SZ&idx=1&m=54d9e832aea5e1a14f03b2aebd26bf1d&token=AxricY7RBHdVk57lOPZsrUJFAQ0icQkkZgFqibbUPcfgoibx6H8fmJSHpV6BQGrH1kt7flxKW6MPBnw&finder_expire_time=1686560840&finder_eid=export%2FUzFfAgtgekIEAQAAAAAAFgk3kA6cgwAAAAstQy6ubaLX4KHWvLEZgBPEkaI8AyA8SviHzNPgMILIK6L21Dn6fOTie1ZsgOWc",
"url": "https://channels.weixin.qq.com/web/pages/feed?eid=export%2FUzFfAgtgekIEAQAAAAAAFgk3kA6cgwAAAAstQy6ubaLX4KHWvLEZgBPEkaI8AyA8SviHzNPgMILIK6L21Dn6fOTie1ZsgOWc",
"extras": "CAEQACKdHQAE9OmXBAAAAQAAAAAAFxcaAlyWpjpNCcilfWQgAAAAaeq5SzX7s7sPwaz04zCEwYwyALHFYGIb/l1etP1AtP0MeKuTmBlao9RXXHwbF4Uhl5rs5S1a3gClrWEn8j0IEH5qDfvdP2aAHjgLU+sFiHppLlimU5MUyt29LoRZrjncQOFIfBgd2ms/sWnaUExgMRvLbH4tbJKwrLUsQ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oU3zYZdslErJr3Lq3OFSt9Ean+oX87gT22SKh3MObFBs4XwggFz7GnHCd1Myn2TrWZae1bgdK9SCCuDCgf1U2zRWxYgmtxViWIAp8H7Di0idkQaBD2/DhHtAtU/jBkfkrQYCfrFc65O5/tPRTio3FX6wqI3DhM8mWnp/JcwTqQgzxeFolIsy+Kfc6Aii0y71cdvIiuuIdSdizL5AF1iT7/rO2I+EjDRRAxn/l06z7QZ9IwCMPvEJN63ZRLuKwxS7+Isd4JmYVHE1/RGjXNN3aWfmySWGd7lNdKjwlnGxG3tJjutQPk1GzvoroQlKxjj38gWB6p2HsRuG5/YxL3irUt6bMKkMul5FSB+4xPZoStEx0aT1Jvtq+PTkfDKNUN6jGImyjeGXiyK+6AKq4KY3ljjxoNHR1E0cYlv/F420Hfnifee0nsCpKrNawOHIln1KbsN1OTCgA",
"avatar": "http://wx.qlogo.cn/finderhead/ver_1/T8aSGefbN4oJzuGjRaHfJZ5E8ae7up9QLic3NMUbTAQQtiaKyBiaaqRDTiaJjBQqkL4DgFxXLJIRN4uOF92kejGJ37pX86ykKItNQ5xXFd9BvzA/0",
"type": 1
}
]
}
通过id发送视频号消息
POST /videonum/send
请求参数:
- wxId string 企业微信id
- conversationId string 接收者的会话ID
- videoNumId 视频号列表接口返回的id
{
"wxId": "168885040790XXXX",
"conversationId": "S:168885040790XXXX_788130195497XXXX",
"videoNumId": 20
}
返回例示:
{
"msg": "",
"code": 0,
"data": {
"msgId": "bc871471-a05a-4327-a640-a72000f78233"
}
}
文件上传
POST /file/upload
💡需要使用form-data格式
请求参数:
- file 图片的二进制数据
💡返回的data即为文件路径,此路径为相对路径,前面需要带上quntool的域名才能访问,如果只是用来通过msg/image等接口发送消息,传相对路径即可
返回例示:
{
"msg": "",
"code": 0,
"data": "/gnapi/Files/20211009/e0faf54d186d24c412f69c1791091273/发布群控.txt"
}
群发确认(目前仅支持群发到客户)
POST /batchmsg/confirm
💡如果有多条未确认的群发消息,默认会按照发布时间倒序全部进行确认发送,不过企微每天群发数量会有限制,所以只会发送最近一次的群发消息
请求参数:
- wxId string 企业微信id
返回例示:
{
"msg": "",
"code": 0,
"data": null
}
MQTT方式发送消息
方式发消息
mqtt连接
quntool服务器的IP,端口1884
mqtt订阅Topic
SendMessageResp
mqtt发送Topic
SendMessage
mqtt发送
type字段为消息类型,分别为text,image,personCard,link,file,video,miniProgram,roomAt,gif,videoNum
id字段为不重复的随机数,用来匹配我这边返回的msgid用
其他字段和openapi的http发送接口保持一致
{
"wxId": "1688850407900545",
"conversationId": "S:1688850407900545_7881301954974667",
"content": "你好啊",
"type": "text",
"id": "1234567"
}
mqtt接收
{
"id": "1234567",
"msgId":"7B8D35DA-1D52-46E0-8A7C-356CF52C3007"
}