微信 登录 Scope 参数错误或没有 Scope 权限
2017-07-04 12:16
429 查看
//电脑端 扫码授权登录
public static string AuthUrl = "https://open.weixin.qq.com/connect/qrconnect?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
//移动端 直接授权登录
public static string AuthUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
//获取 Token
public static string TokenRequestUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?grant_type=authorization_code&appid={0}&secret={1}&code={2}";
//获取 用户信息
public static string GetUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}";
微信公众号(公众平台) 和 微信开放平台 是两码事。
公众号(公众平台)获取的scope只包括两种:snsapi_base 和snsapi_userinfo,前者是静默获取,用户无感知;后者是需要用户确认同意的。
微信开放平台(https://open.weixin.qq.com/) 用 scope=snsapi_login
public static string AuthUrl = "https://open.weixin.qq.com/connect/qrconnect?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
//移动端 直接授权登录
public static string AuthUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_login&state={2}#wechat_redirect";
//获取 Token
public static string TokenRequestUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?grant_type=authorization_code&appid={0}&secret={1}&code={2}";
//获取 用户信息
public static string GetUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}";
微信公众号(公众平台) 和 微信开放平台 是两码事。
公众号(公众平台)获取的scope只包括两种:snsapi_base 和snsapi_userinfo,前者是静默获取,用户无感知;后者是需要用户确认同意的。
微信开放平台(https://open.weixin.qq.com/) 用 scope=snsapi_login
相关文章推荐
- 微信移动应用接入开发, Android 授权微信登录获取openid,unionid等,score参数错误或者没有scope权限
- WSTMall 微信登录:Scope参数错误或者没有Scope权限
- 微信移动应用接入开发, Android 授权微信登录获取openid,unionid等,score参数错误或者没有scope权限
- 微信第三方登录测试时报Scope参数错误或没有Scope权限解决方法
- 微信测试号scope参数错误或没有scope权限
- 微信开发: scope参数错误或没有scope权限解决方法
- 微信测试号——scope参数错误或没有scope权限
- 微信测试号Scope参数列表错误或没有Scope权限
- 微信oauth2.0报错,Scope参数错误或没有Scope权限
- 微信网页授权 Scope参数错误或没有Scope权限 解决方法
- Scope参数错误或没有Scope权限解决方法
- 01_微信网页授权总结 另:scope参数错误或权限的问题解决
- Scope参数错误或没有Scope权限
- 微信开放平台网站应用(Scope参数错误或没有Scope权限)
- scope参数错误或没有scope权限
- 微信公众平台开发教程(十)Scope参数错误或没有Scope权限解决方法
- 关于微信公众号scope参数错误或没有scope权限的解决方案
- scope参数错误或没有scope权限解决方法