微信公众号 access_token 40001时好时坏?
发布于 5 年前 作者 yang30 8080 次浏览 来自 官方Issues

这段时间非常频繁,同一个 access_token 有时没有问题,有时有说过期。下面是日志

同一个access_token

============================================成功的===============================================

[[[接口调用]]]

[2019/8/26 13:56:04]

[线程:15]

    URL:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=24_pppFPnAEMqvoe9tPpJSHg-iK8fnINfL5bG4lpvtWwb9XFD_elm_aM-vLlerMcGZiwf8oYrYy8I-Gvrft0b3s3lkzWUpdi12kBjs8AVfcf1fJ0glOR_aoJUOISxhlij1J_UVB8EsLwMitTt9DVEJiAHACLQ

    Result:

{“errcode”:0,“errmsg”:“ok”}

=======================================失败的=========================

[[[接口调用]]]

[2019/8/26 13:56:04]

[线程:15]

    URL:https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=24_pppFPnAEMqvoe9tPpJSHg-iK8fnINfL5bG4lpvtWwb9XFD_elm_aM-vLlerMcGZiwf8oYrYy8I-Gvrft0b3s3lkzWUpdi12kBjs8AVfcf1fJ0glOR_aoJUOISxhlij1J_UVB8EsLwMitTt9DVEJiAHACLQ

    Result:

{“errcode”:40001,“errmsg”:“invalid credential, access_token is invalid or not latest hint: [7y0Q_a0964z200!]”}

=============================================成功的==============================================

[[[接口调用]]]

[2019/8/26 13:56:08]

[线程:8]

    URL:https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=24_pppFPnAEMqvoe9tPpJSHg-iK8fnINfL5bG4lpvtWwb9XFD_elm_aM-vLlerMcGZiwf8oYrYy8I-Gvrft0b3s3lkzWUpdi12kBjs8AVfcf1fJ0glOR_aoJUOISxhlij1J_UVB8EsLwMitTt9DVEJiAHACLQ

    Result:

{“errcode”:0,“errmsg”:“ok”,“msgid”:959769122332639232}

[[[接口调用]]]

[2019/8/26 13:56:08]

[线程:8]

    URL:https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=24_pppFPnAEMqvoe9tPpJSHg-iK8fnINfL5bG4lpvtWwb9XFD_elm_aM-vLlerMcGZiwf8oYrYy8I-Gvrft0b3s3lkzWUpdi12kBjs8AVfcf1fJ0glOR_aoJUOISxhlij1J_UVB8EsLwMitTt9DVEJiAHACLQ

    Result:

{“errcode”:0,“errmsg”:“ok”,“msgid”:959769126661160961}

===============================================失败的============================================

[[[接口调用]]]

[2019/8/26 13:56:12]

[线程:62]

    URL:https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=24_pppFPnAEMqvoe9tPpJSHg-iK8fnINfL5bG4lpvtWwb9XFD_elm_aM-vLlerMcGZiwf8oYrYy8I-Gvrft0b3s3lkzWUpdi12kBjs8AVfcf1fJ0glOR_aoJUOISxhlij1J_UVB8EsLwMitTt9DVEJiAHACLQ

    Result:

{“errcode”:40001,“errmsg”:“invalid credential, access_token is invalid or not latest hint: [09724694!]”}

5 回复

这几天,我也遇到这个问题,已经连续两天出现了,请问你解决没

之前都没有问题,出现这个情况一个多月吧,都要崩溃了。

现在更诡异的事情是,另外一个应用,代码都是一样的。却很少出现这个问题。

检查下开发环境、测试环境和生产环境是不是有一个进程把access_token给刷新掉了。

遇到一样的问题,同一条accesstoken,有效期内,时好时坏,有什么解决方案么

是不是多业务 冲突了 应该统一调用

回到顶部