调用 微信公众号 发送模板消息接口,发生错误:{"errcode":48001,"errmsg":"api unauthorized rid:
原因是获取access_token的时候,使用了小程序的AppId,而不是公众号的AppId,所以没有权限。
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Template_Message_Interface.html