getUserInfo:fail api scope is not declared in the privacy agreement
时间: 2023-10-31 09:21:38 浏览: 199
微信小程序-getUserInfo回调
当调用wx.getUserProfile进行授权时,返回错误信息"getUserProfile:fail api scope is not declared in the privacy agreement"表示在隐私协议中未声明相关的权限范围。为了解决这个问题,你需要在执行wx.getUserProfile之前先调用uni.openPrivacyContract函数进行隐私协议的打开操作,以确保已声明了所需的权限范围。此外,你还可以增加一个弹窗来引导用户阅读小程序的隐私保护指引。在用户确认阅读并同意后,再调用wx.getUserProfile获取用户信息即可。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [{errMsg: “getUserProfile:fail api scope is not declared in the privacy agreement“, errno: 112}](https://blog.csdn.net/qq_38839887/article/details/132317169)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文