Google,Yahoo,Twitter服务提供商使用oauth获得emailId的终点是什么? [英] What are the end points to get the emailId using oauth for the google, yahoo, twitter service providers?

查看:141
本文介绍了Google,Yahoo,Twitter服务提供商使用oauth获得emailId的终点是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Appengine Java Web应用程序.我正在尝试将OpenId身份验证放入我的项目中.我正在使用抄写员来实现这一目标.我可以从Google,雅虎,Twitter服务提供商处获取访问令牌.

I am using google appengine java web application. I'm trying to put OpenId authentication withIn my project. I am using scribe to make this happen. I am able to get the Access Token from the google, yahoo, twitter Service Providers.

  • 获取访问令牌后,我需要获取当前登录的用户电子邮件地址.我使用的是Google的OAuth2.0,使用的是Yahoo和Twitter的OAuth1.0a.

任何建议将不胜感激.

推荐答案

Google:

https://www.googleapis.com/oauth2/v3/userinfo?access_token={0}


Twitter:

  • Twitter不会公开提供用户电子邮件地址的终结点.甚至没有配置文件终结点.以下摘录自 Twitter的常见问题解答页面 ...

  • Twitter :

    • Twitter does not expose an endpoint that provides the user's email address. Not even the profile endpoint. Below is an extract from the Twitter's FAQs page...
    • 如果您想要用户的电子邮件地址,则需要在您自己的应用程序和服务范围内向用户询问. Twitter API不会在OAuth令牌协商过程中提供用户的电子邮件地址,也不会提供其他方式来获取它.

      If you'd like a user's email address, you'll need to ask a user for it within the confines of your own application and service. The Twitter API does not provide the user's email address as part of the OAuth token negotiation process nor does it offer other means to obtain it.


      Yahoo:

      • 我也不认为它公开了用户的电子邮件地址.但是,用于检索用户个人资料的端点是...


        Yahoo :

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆