scope參數錯誤或沒有scope權限

出現這種錯誤網上查出現有的緣由是:php

  1. 訂閱號沒有相關的權限web

  2. 帳號沒有認證,沒有相關的權限api

那麼這裏遇到問題兩種都不是。開發帳號是 服務號,並且也是認證號。app

解決方法:spa

錯誤配置:code

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&scope=snsapi_userinfo&response_type=code&state=STATE#wechat_redirect

 

正確的配置:開發

https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf0e81c3bee622d60&redirect_uri=http%3A%2F%2Fnba.bluewebgame.com%2Foauth_response.php&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect

 

  緣由就是scope的位置不同!!! oauth

scope 爲 snsapi_base的時候沒有影響。可是scope爲snsapi_userinfo  就會提示 scope參數錯誤或沒有scope權限 。配置

相關文章
相關標籤/搜索