全网发布调用发送客服消息接口,错误提示48001 api功能未授权?
发布于 5 年前 作者 wdeng 9282 次浏览 来自 官方Issues

调用接口:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN

appid: wx89c9d36f03bc6e84

错误信息:“errcode”:48001,“res”:"{“errcode”:48001,“errmsg”:“api unauthorized rid: 5ffff500-1ab22205-65210149”}",“errmsg”:“api unauthorized rid: 5ffff500-1ab22205-65210149”

3 回复

https://open.weixin.qq.com/ -> 「管理中心」-> 「第三方平台」->「详情」-> 「权限管理」-> 「客服消息管理权限」

已经解决了,是因为access_token传参错误了,我之前传的是第三方平台的component_access_token,而应该传参 微信请求测试账户的access_token。

1、获取微信调用的请求参数中的$query_auth_code$值。

2、调用api接口 使用授权码获取授权信息,获取测试账户的authorizer_access_token

https://api.weixin.qq.com/cgi-bin/component/api_query_auth?component_access_token

3、调用api发送客服消息接口,access_token 参数的值是微信测试账户的authorizer_access_token

https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN

回到顶部