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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
You can get user's username and email with endpoint: https://www.googleapis.com/userinfo/email with scope: https://www.googleapis.com/auth/userinfo#email.