gpt4 book ai didi

google-api - 无法使用 - auth/user.phonenumbers.read 范围从用户的谷歌个人资料中读取电话号码

转载 作者:行者123 更新时间:2023-12-04 23:06:44 29 4
gpt4 key购买 nike

基于 Google People API 的文档我正在使用配置文件范围 - https://www.googleapis.com/auth/user.phonenumbers.read PersonFields=电话号码 仅在他们的 Google 个人资料中读取经过身份验证的用户的电话号码(联系人列表中没有)。我正在使用 API key 和 oAuth 访问 token 来授权请求​​。 google people API 不会单独获取与上述范围的个人资料关联的电话号码。添加整个 的范围联系人列表读取权限 除了上述范围,即 www.googleapis.com/auth/contacts.readonly 返回配置文件中的电话号码 正确 .有什么办法可以从他/她的个人资料中获取用户的电话号码仅使用 user.phonenumbers.read 范围?

最佳答案

我能弄清楚问题所在。对于 'user.phonenumbers.read' 范围,人员 API 状态的文档 - '您的应用程序被授予对他们 中经过身份验证的用户电话号码的读取访问权限Google 个人资料 '。

但是通过' Google 个人资料 ' 表示 Google Plus Profile这是 完全不同 形成他们的核心谷歌个人资料 - My Account . People API 仅从 Google Plus 个人资料中获取信息。

因此,即使用户在 中添加了他/她的联系方式我的帐号 ,除非他们在 Google Plus 个人资料中手动添加了电话号码,否则 People API 不会获取他们的电话号码。添加联系方式后,我可以通过 获取联系方式'auth/user.phonenumbers.read' 无需添加“auth/contacts.readonly”范围。

关于google-api - 无法使用 - auth/user.phonenumbers.read 范围从用户的谷歌个人资料中读取电话号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46661815/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com