https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getAccessToken.html
问题描述:
本地两小时少一分钟调用一次,并缓存 ,最近一次 获取token:2023-08-31 16:31:33,并缓存,用此token生成二维码但是报错时间是2023-08-31 17:28:52,远远没到7200秒。
2023-08-31 16:31:33获取日志:
serverlog.content:get access token-key=WXMINI_ACCESSTOKEN_PREFIX_CACHE_wx6a9b43dd784dcb4b,res={"access_token":"72_aihmtEht-9vMFbDK_hugyd2_ClkwnOsXhM15TIcLY_yTFuijKFJzXMoxkIsKEGKsn6aGl3hvKje9GnL-1zCAxouoEjI2Vb1HYgofqk4CArPOVVr9nxxN6RUs9UUELPfACAYFJ","expires_in":7200}
当时排查缓存数据是这个,和上面的获取返回的相同
"72_aihmtEht-9vMFbDK_hugyd2_ClkwnOsXhM15TIcLY_yTFuijKFJzXMoxkIsKEGKsn6aGl3hvKje9GnL-1zCAxouoEjI2Vb1HYgofqk4CArPOVVr9nxxN6RUs9UUELPfACAYFJ"
2023-08-31 17:28:52报错日志如下:
serverlog.content:getMiniQr fail,result:{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, could get access_token by getStableAccessToken, more details at https://mmbizurl.cn/s/JtxxFh33r rid: 64f05d54-664d3b44-1c147bc0"}
问题描述:
本地两小时少一分钟调用一次,并缓存 ,最近一次 获取token:2023-08-31 16:31:33,并缓存,用此token生成二维码但是报错时间是2023-08-31 17:28:52,远远没到7200秒。
2023-08-31 16:31:33获取日志:
serverlog.content:get access token-key=WXMINI_ACCESSTOKEN_PREFIX_CACHE_wx6a9b43dd784dcb4b,res={"access_token":"72_aihmtEht-9vMFbDK_hugyd2_ClkwnOsXhM15TIcLY_yTFuijKFJzXMoxkIsKEGKsn6aGl3hvKje9GnL-1zCAxouoEjI2Vb1HYgofqk4CArPOVVr9nxxN6RUs9UUELPfACAYFJ","expires_in":7200}
当时排查缓存数据是这个,和上面的获取返回的相同
"72_aihmtEht-9vMFbDK_hugyd2_ClkwnOsXhM15TIcLY_yTFuijKFJzXMoxkIsKEGKsn6aGl3hvKje9GnL-1zCAxouoEjI2Vb1HYgofqk4CArPOVVr9nxxN6RUs9UUELPfACAYFJ"
2023-08-31 17:28:52报错日志如下:
serverlog.content:getMiniQr fail,result:{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, could get access_token by getStableAccessToken, more details at https://mmbizurl.cn/s/JtxxFh33r rid: 64f05d54-664d3b44-1c147bc0"}