使用自己微信号登陆开发者工具后
1.使用测试号获取https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx28ec0977e5be7362&redirect_uri=http://127.0.0.1:8190/WeChatPayApi/auth&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect,可以正常获取code和openid
2.使用公众号自身的appid获取https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa24165a5bd867d62&redirect_uri=http://127.0.0.1:8190/WeChatPayApi/auth&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect,返回redirect_uri参数错误
求指教,这是为什么?
需要到公众号后台配置网页授权域名
希望对有相同疑惑的朋友有所帮助:
1.测试号可以设置ip带端口号的回调地址;
2.正式公众号的回调地址必须是公众号中设置的,备案过的域名