问题描述:2021-01-26 13:30:57这个时间点更新了token,2021-01-26 13:55:07调用接口,提示token过期,正常来说是没有过期的,微信这边能够查看这个appid的token更新记录吗?比如调用ip,调用时间?
具体详情如下:
https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_access_token.html
1.appid:wxf3a3dfd26bb02b0e
获取token时间:2021-01-26 13:30:57
2.调用接口提示:access_token is invalid or not latest
2021-01-26 13:55:07.183 客户端发送报文:URL:https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=41_Swv8ZLfjAnTHDztKHs5qfOEF3rrt9vzFrM5sJsBklPYn72hXHIe93e-L_G89okb-TsTb9otCVUDb6C6XNBHzywSj24unH_kZ3hj4DFk_7OeaEA74slKY-VrtoeJrxUdF42DHbSFuFxtJHTEkTTIhACAJJY
HttpHeader:Content-Type=application/json;charset=UTF-8
HttpHeader:access_token=41_Swv8ZLfjAnTHDztKHs5qfOEF3rrt9vzFrM5sJsBklPYn72hXHIe93e-L_G89okb-TsTb9otCVUDb6C6XNBHzywSj24unH_kZ3hj4DFk_7OeaEA74slKY-VrtoeJrxUdF42DHbSFuFxtJHTEkTTIhACAJJY
ContentLength:81,Content:{"scene":"ukId=iZC4rw67i1","page":"packageDetail/pages/detail/index","width":170}
2021-01-26 13:55:07.245 客户端接收报文
{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest rid: 600faebb-3ec2ef6d-3fd26924"}
3.后续获取token时间:2021-01-26 14:35:52
自查是不是别的地方调用请求了token,导致当前使用的token不是最新的。
这个接口应该全系统只有一条语句,而且应该是定时获取后用于保存在数据里或者redis里,不应该用在其他任何逻辑里,去查吧。其他地方想用token,只能去数据库或者redis里查。
1.https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_access_token.html
2.https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/api/api_authorizer_token.html