使用OAuth访问令牌提取Gmail用户名 [英] Extracting Gmail username with OAuth access token
本文介绍了使用OAuth访问令牌提取Gmail用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用OAuth让用户授予我对Gmail IMAP帐户的访问权限。我可以成功获取访问令牌,并且需要知道我可以访问哪个端点以获取经过身份验证的用户的电子邮件地址。 p>您可以使用Google的 OAuth Playground 来测试此Feed,就像我刚才那样。
在第一步中,粘贴范围:
https:/ /www.googleapis.com/auth/userinfo#email
在第六步中,粘贴提要URI :
https://www.googleapis.com/userinfo/email
这应该有助于调整Feed以供您自己的应用程序使用。
I'm using OAuth to get a user to grant me access to their Gmail IMAP account. I can successfully get an access token, and need to know what endpoint I can access to get the authenticated user's e-mail address.
解决方案
And you can test this feed using Google's OAuth Playground, as I just did.
In step one, paste the scope:
https://www.googleapis.com/auth/userinfo#email
And in step six, paste the feed URI:
https://www.googleapis.com/userinfo/email
This should help in adapting the feed for use in your own application.
这篇关于使用OAuth访问令牌提取Gmail用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文