请求微信小程序码 遇到 40001错误
发布于 6 年前 作者 minggu 17597 次浏览 来自 问答

小程序请求小程序码时遇到以下错误

“errcode”:40001,“errmsg”:“invalid credential, access_token is invalid or not latest hint: [HDuq3a0761wxa1]”

,遇到错误前可以请求,  错误后也可以请求。且中间 access_token 没变

这是什么原因?

接口请求有限制么?(用的接口B)

accessToken用 redis 保存,取法如下:

String qrUrl = WeiXinUtils.getWXAppQrcodeUrl(wxServiceCache.getAccessToken());
            PostMethod postMethod = new PostMethod(qrUrl);postMethod.setRequestBody(postJson);
            HttpClient httpClient = new HttpClient();
            httpClient.executeMethod(postMethod);

1 回复

+1 楼主解决了嘛?

回到顶部