网页授权后调用获取用户信息接口
https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN
返回 errcode":48001,"errmsg":"api unauthorized.
检查了好多遍 , appid是对的, scope 是snsapi_userinfo, 接口权限都有, 为啥一直报这个错?
而且发现, 获取未关注的用户的信息, 就会报这个错, 如果用户关注了公众号, 就能获取成功.
你好,麻烦提供下完成的回包和原始ID
http://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4e651b54b526be77&redirect_uri=https://ols.cmrh.com/uc/auth/authRedirect/wx4e651b54b526be77&response_type=code&scope=snsapi_userinfo&state=82A69973E249A6EDED86E4496603076A_OSAP_shortCode=68zmva&uin=&key=&version=6302019a
回包:
(48001)api unauthorized, rid: 61758516-528cb403-7028cde3
生产环境只能拿到这些
客户端访问链接:
http://open.weixin.qq.com/connect/oauth2/authorize?appid=wx4e651b54b526be77&redirect_uri=https://ols.cmrh.com/uc/auth/authRedirect/wx4e651b54b526be77&response_type=code&scope=snsapi_userinfo&state=82A69973E249A6EDED86E4496603076A_OSAP_shortCode=68zmva&uin=&key=&version=6302019a