如何在没有凭据的情况下以编程方式从 Gmail 地址确定 Google 帐户 USERID 令牌?
我正在使用 Google Books API 开发一些东西,但我认为这可以推广到许多 Google API。
假设我有一个具有社交功能的应用程序,我可以在其中添加朋友并查看他们的 Google 图书收藏。从 API 文档来看,它说如果我知道他们的用户 ID,我可以检索任何人的集合,但我找不到任何方法以编程方式检索它。我期望用户知道的唯一一件事是他们朋友的 Gmail 地址(或 Google 帐户登录,出于这些目的,这是同一件事)。我能以某种方式获得它的唯一方法是通过他们的 Google 图书网络界面上的 URL。让用户这样做是一种隐晦的折磨。
有谁知道谷歌服务是否可以做到这一点?
具体来说,假设我有一个 Gmail 地址:[电子邮件受保护],我可以吗然后查询一些Google服务来获取该用户的用户ID?用户 ID 基本上是一个非常大的数字(大约 20 位数字)
I'm developing something with the Google Books API, but I think this can be generalized across many of Google's APIs.
Suppose I have an app that's got a social aspect where I can add friends and see their Google Books collection. From the API docs, it says I can retrieve anybody's collection if I know their userid, but I can't find any way to retrieve it programmatically. The only thing I can expect a user to know is their friend's gmail address (or Google Account Login, which, for these purposes, is the same thing). The only way I can somehow get it is through a URL on their web interface for Google books. Making users do it that way is an obscure form of torture.
Does anyone know if this is possible with any Google service?
Specifically, suppose I had a gmail address: [email protected], could I then query some Google service to get the userid for that user? A userid is a basically a really big number (around 20 digits)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是类似的问题与尼克·约翰逊的解决方案/解决方法:
Here's a similar question with a solution/workaround from Nick Johnson: