What are the end points to get the emailId using oauth for the google, yahoo, twitter service providers?

╄→гoц情女王★ 提交于 2019-12-25 15:33:32

问题


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.

  • After getting the Access Token, I need to get the currently logged-in user email address. I'm using OAuth2.0 for google, OAuth1.0a for yahoo and twitter.

Any suggestions would be appreciated.


回答1:


Google :

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

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...

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 :

  • I don't think it exposes the user's email address either. Yet, the endpoint to retrieve the user's profile is...

    http://social.yahooapis.com/v1/user/{guid}/profile

  • You can find more info here. http://developer.yahoo.com/social/rest_api_guide/extended-profile-resource.html



来源:https://stackoverflow.com/questions/21570408/what-are-the-end-points-to-get-the-emailid-using-oauth-for-the-google-yahoo-tw

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!