Hi,
I'm a student and new to GWT and OAuth, so pardon my ignorance. I'm having some trouble using the token given to me once the user has granted me access (I'm using the java version).
What I'm trying to do is get the users email address which I should be able to do using the following URL:
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=<token_here>
If I paste that same URL into my browser (with the token I was granted) I'm given a JSON response (see bellow), which would be perfect because that's all I want and I can parse that very easily.
{
"issued_to": "**************.
apps.googleusercontent.com",
"audience": "**************.
apps.googleusercontent.com",
"scope": "
https://www.googleapis.com/auth/userinfo.email",
"expires_in": 2557,
"email": "*************@
gmail.com",
"verified_email": true,
"access_type": "online"
}
I figured I could just use the standard GWT HTTP GET request:
http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/DevGuideHttpRequests
However, when I send my GET request, I don't get a response back at all. Why is this? How can I get the users email address?
Any help would be greatly appreciated,
Jonathan