第一步获取access_token
https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=【登陆企业微信管理账号查看:我的企业-企业id】&corpsecret=【应用管理:新建应用成功-查看secret】
第二步推送消息
post请求https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=+access_token
{
“touser”: “【接收消息的人的id】”,
“toparty”: “【接收消息的部门id】”,
“totag”: “【接收消息的标签id】”,
“msgtype”: “text”,//文本
“agentid”: 【应用管理:新建应用成功-查看agentid】,
“text”: {
“content”: “【推送消息的内容,文本类型】”
},
“safe”: 0,
“enable_id_trans”: 0,
“enable_duplicate_check”: 0,
“duplicate_check_interval”: 1800
}
touser、toparty、totag 三个不能同时为空,多个用|隔开
版权声明:本文为anzo1129原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。