调用公众号模板消息接口,返回invalid credential?

小程序 文章 2022-02-28 17:00 985 0 全屏看文

AI助手支持GPT4.0

调用公众号模板消息接口,返回invalid credential?Call the public account template message interface and return invalid credential?

调用公众号模板消息接口,返回invalid credential?

具体错误信息如下:invalid credential, access_token is invalid or not latest rid: 6218a8b5-6de49537-665c8865。

具体场景是批量调用微信模板消息发送接口,部分请求是正常,部分请求返回如上错误信息。

The specific error information is as follows: invalid credential, access_ token is invalid or not latest rid: 6218a8b5-6de49537-665c8865。 The specific scenario is to call the wechat template message sending interface in batch. Some requests are normal and some requests return the above error message.

回答:

社区技术运营专员-CJiang:

要用最后刷新的那个token,旧的token不能保证有效

谢洪:能根据rid看下具体原因?在这个请求之后,有同样的请求是成功的。
谢洪:或者这块是不是由于其他原因导致的失败?
VBit:

有可能重复获取access_token导致以前的过期,检查下代码逻辑

谢洪:同样的请求,后面有成功的。
VBit:旧的不保证能成功,也就是可能能成功也可能失败,和时间没关系,检查代码逻辑,access_token统一管理,确保access_token的可用性
谢洪:

同样的请求,我有的是可以的,有的不行。

崔丛丛:

写着原因呢,access_token is invalid or not latest,自己排查一下就可以

Mr.Zhao:排查的出来就不用问了

-EOF-

AI助手支持GPT4.0