errcode:40029是什么原因,求教一下
发布于 4 年前 作者 songxiulan 6084 次浏览 来自 问答

在网上也搜了一部分,但是都不理想,有没有碰见这类问题的。。。求教

在获取到code之后

根据code,appid,sercet,获取信息。出的这个错

1 回复

//java代码

String url = url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + appId +
       "&secret=" + appSecret + "&js_code=" + code + "&grant_type=authorization_code";


//进行网络请求,访问url接口
ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.GET, null, String.class);

//结果

<200,{“errcode”:40029,“errmsg”:“invalid code, hints: [ req_id: ******* ]”},{Connection=[keep-alive], Content-Type=[text/plain], Date=[Mon, 23 Jul 2018 09:34:34 GMT], Content-Length=[76]}>

回到顶部