1. 程式人生 > >微信網頁授權獲取使用者資訊 返回{"errcode":40066,"errmsg":"invalid url hint: [FZbxRA0556sz12!]"}錯誤

微信網頁授權獲取使用者資訊 返回{"errcode":40066,"errmsg":"invalid url hint: [FZbxRA0556sz12!]"}錯誤

微信網頁授權獲取使用者資訊配置都對,但是返回:{"errcode":40066,"errmsg":"invalid url hint: [FZbxRA0556sz12!]"}這個錯誤。

這個問題困擾我一個小時,百度了半天看到一位大神的回答才知道。

網頁授權的 AccessToken 和獲取使用者資訊的 AccessToken 不是一個東西。

也就是你上面的根據access_token和openid獲取使用者的介面地址應是

https://api.weixin.qq.com/sns/userinfo

而不是

請注意紅色標記上的。