微信开放平台API无法正常获取access_token?

发布于 7 年前作者 guiying517517 次浏览最后编辑 7 年前来自 ask

请求 code 成功

但是用code换取 access_token报错

报错: “errcode”:40066,“errmsg”:"invalid url hints:

网站应用中配置的授权回调域是正确的

API请求地址为:

https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code#wechat_redirect
1 回复
otao
otao1 楼5 年前
#wechat_redirect  这个去掉试试