I have an android application and web-server working together. Now I want user log in via google from android application (or use one of the google accounts on android). Then andriod application passes token to my web-server with service call… and here I can’t realise how to get user email or profile data from google having that token.
I can make a call like this in my browser: https://www.googleapis.com/oauth2/v1/tokeninfo?access_token={accessToken}
But how to do that using google libraries? What library to use and so on?
Depending on which service you try to use, just pick the right one of Google’s Client Libraries and check out the Google+ Sample.
The first half should be basically the same for all APIs. For getting the User info, you would need the
oauth2library and then do something like this (taken from this example):