{“errcode”:48001,”errmsg”:”api unauthorized rid: 627e1384-5ecd28e9-263acb54″({“errcode”:48001,”errmsg”:”api unauthorized rid: 627e1384-5ecd28e9-263acb54″)

1.错误描述

发送小程序消息时报错 {“errcode”:48001,”errmsg”:”api unauthorized rid: 627e1384-5ecd28e9-263acb54″}

2.问题解决

1.其实出来这个问题的时候,网上大概搜了一下,但是也没有解决,最后看了一下官方的权限集常见排错指南,根据排除法解决了我的问题。
2.我出现这个报错的原因是,调用接口的时候token传错了,mongodb存token的时候没有加类型,并且发送小程序消息时,公众号的token没有过期,导致给小程序发消息的时候获取了公众号的token,所以就报了此错误。

————————

1. Error description

When sending an applet message, an error is reported {“errCode”: 48001, “errmsg”: “API unauthorized rid: 627e1384-5ecd28e9-263acb54”}

2. Problem solving

1. In fact, when this problem came out, I searched it on the Internet, but it was not solved. Finally, I looked at the official permission set common troubleshooting guide and solved my problem according to the troubleshooting method.
2. the reason for this error is that the token was sent incorrectly when calling the interface, mongodb did not add a type when saving the token, and the token of the official account did not expire when sending the applet message, resulting in the token of the official account being obtained when sending the message to the applet, so this error is reported.