微信公众平台网页授权无法获得code 报41008错

微信公众平台网页授权无法获得code 报41008错

问题描述:

微信公众平台网页授权无法获得code 报41008错

自定义菜单
https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri=http://www.wx84.cn/weini/page/weixin/app/index.html&response_type=code&scope=snsapi_base&state=car&connect_redirect=1#wechat_redirect

java
String code = request.getParameter("code");

这里code是空 所以下一步就报错了
public static String oauth_access_token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=APPSECRET&code=CODE&grant_type=authorization_code";

问题解决了,原来微信增加了白名单
配置下自己的ip就能通过了

仔细检查下AppSecret

正常跳转但是不带code?