模板消息只能发送一次,再发送就会报40001错误
发布于 5 年前 作者 xiuyingwu 8100 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

我调用sendTemplateMes发送模板消息,调用:

POST https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN

只能调用一次(即第一次调用是成功的),然后就报:

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

必须重新请求

GET https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET

重新获取token才能再次发送。

1 回复

accesstoken是不是被别人刷新了

回到顶部