微信公众号测试号 网页域名授权出现redirect

    xiaoxiao2022-07-12  150

    1.检查你的链接是没有问题的。

    2.在微信公众号测试号对回调的域名进行配置,如图

       

    配置你的域名 你的域名必须和redirect_uri的域名一模一样的

    3.检查你的redirect_uri是否有加上http://并进行uriencode,可以进入这个网站进行编码http://tool.chinaz.com/tools/urlencode.aspx 

    例如我想要我的回调链接是xxxxxdinho.natapp1.cc/sell/weixin/auth  那我在redirect_uri必须编码成xxxxxdinho.natapp1.cc/sell/weixin/auth

    然后我的获取code的链接就应该是https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx96b8b577711e54ec&redirect_uri=http://xxxxxdinho.natapp1.cc/sell/weixin/auth&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect

    一般到这一步应该就可以了 欢迎留言讨论

    最新回复(0)