使用这个接口获取的ACCESS_TOKEN
https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid="+corpid+ "&corpsecret="+corpsecret
然后想调用下面这个接口获取客户的 external_userid
https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN
但一直提示
{"errcode":48002,"errmsg":"api forbidden, hint: [1651206298340381809633310], from ip: 14.145.165.156, more info at https://open.work.weixin.qq.com/devtool/query?e=48002","external_userid":[]}
https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN 这个接口需要 external_userid, 给企业微信的用户发送消息.
现在不知道该如何处理了.
已经解决了, 获取token的接口 corpsecret参数需要使用外部联系人的 secret