- 当前 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才能再次发送。
accesstoken是不是被别人刷新了
正解,我们的账户在别的地方也请求获取accesstoken了:测试的、预发的、线上的用的同一个appid,导致。。。