调用微信授权接口报错 redirect_uri域名与后台配置不一致 1错误码0003设置都没问题?

小程序 文章 2022-01-10 23:00 909 0 全屏看文

AI助手支持GPT4.0

调用微信授权接口报错 redirect_uri域名与后台配置不一致 1错误码0003设置都没问题?Calling the WeChat authorization interface reports an error that the redirect_uri domain name is inconsistent with the background configuration. 1 Error code 0003 Is there any problem with the settings?

调用微信授权接口报错 redirect_uri域名与后台配置不一致 1错误码0003设置都没问题?

下面是跳转微信的请求url

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx59bb596f9o59aef5&redirect_uri=https%3A%2F%2Ftxwq.njyhstone.com%2Fapp%2Findex.php%3Fi%3D2%26c%3Dauth%26a%3Doauth%26scope%3Dsnsapi_base&response_type=code&scope=snsapi_base&state=we7sid-1a931ea11e4c59d196cd7b39df6fbdea#wechat_redirect

urlencode解码后:

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx59bb596f9o59aef5&redirect_uri=https://txwq.njyhstone.com/app/index.php?i=2&c=auth&a=oauth&scope=snsapi_base&response_type=code&scope=snsapi_base&state=we7sid-1a931ea11e4c59d196cd7b39df6fbdea#wechat_redirect

下面是公众平台配置的网页授权域名,白名单ip也设置了这个域名的ip,,appid也核对了很多遍没问题,不知道为什么就是不行这没法继续了,,一直提示 redirect_uri域名与后台配置不一致

下面是跳转微信的请求url https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx59bb596f9o59aef5&redirect_uri=https%3A%2F%2Ftxwq.njyhstone.com%2Fapp%2Findex.php%3Fi%3D2%26c%3Dauth%26a%3Doauth%26scope%3Dsnsapi_base&response_type=code&scope=snsapi_base&state=we7sid-1a931ea11e4c59d196cd7b39df6fbdea#wechat_redirect urlencode解码后: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx59bb596f9o59aef5&redirect_uri=https://txwq.njyhstone.com/app/index.php?i=2&c=auth&a=oauth&scope=snsapi_base&response_type=code&scope=snsapi_base&state=we7sid-1a931ea11e4c59d196cd7b39df6fbdea#wechat_redirect 下面是公众平台配置的网页授权域名,白名单ip也设置了这个域名的ip,,appid也核对了很多遍没问题,不知道为什么就是不行这没法继续了,,一直提示 redirect_uri域名与后台配置不一致

回答:

胡:

查了下备案也没问题

青寒:

有核对过APPID吗

Mr.Zhao:

appid写错了?配的A账号,oauth2用的B账号

-EOF-

AI助手支持GPT4.0