{"errcode":48001,"errmsg":"api unauthorized rid: 64db34a6-41271e9e-4c76012e"}
时间: 2023-08-22 09:08:51 浏览: 189
根提供的引用内容,报错"errcode":48001,"errmsg":"api unauthorized"是因为API未经授权的错误消息。而该错误消息通常出现在调用用户个人信息时。具体地,调用的URL为"https://api.weixin.qq.com/sns/jscode2session?appid=$appid&secret=$appsecret&js_code=$code&grant_type=authorization_code"。为了解决这个问题,需要对代码进行修改。根据引用的提示,需要将变量scope的值修改为'snsapi_userinfo',即将var scope = GWC.urlParams['scope'] || 'snsapi_userinfo';改为var scope = 'snsapi_userinfo';<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [微信开放平台·微信公众号接口调用报错【“errcode“:48001“errmsg“:“api unauthorized...“】](https://blog.csdn.net/pang_ping/article/details/109454018)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [微信小程序获取openid等参数报错errcode:48001 errmsg:'api unauthorized'](https://blog.csdn.net/qq_38032300/article/details/79540998)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [“errcode“:48001,“errmsg“:“api unauthorized“ 2021年解决方案,100%已解决](https://blog.csdn.net/amtz_2000/article/details/114270587)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文