java - How to get the email from https://www.googleapis.com/plus/v1/people/me call using a google+ token? -


i want email https://www.googleapis.com/plus/v1/people/me call. receive lots of informations, not email. can help?

httpget request = new httpget("https://www.googleapis.com/plus/v1/people/me?scope=https://www.googleapis.com/auth/userinfo.email"); request.setheader("authorization", "bearer <access_token>"); httpresponse response = client.execute(request); 

edit: updated part of improved google+ sign-in options in december 2013 - can email address google+ profile response.

you email endpoint long have email or https://www.googleapis.com/auth/plus.profile.emails.read scopes. see https://developers.google.com/+/web/people/#retrieve_an_authenticated_users_email_address details.

var request = gapi.client.plus.people.get( {'userid' : 'me'} ); request.execute(function(person) {   if(person['emails']) {     console.log(person['emails'][0].value);   } }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -