Hello i am getting google plus access token without using OAuth 2.0 client ID with scopes. But with this access token does not fetch email address. How to fetch user email
String accessToken = "";
try {
URL url = new URL("https://www.googleapis.com/oauth2/v1/userinfo");
// get Access Token with Scopes.PLUS_PROFILE
String sAccessToken;
sAccessToken = GoogleAuthUtil.getToken(
LoginCheckActivity.this,
mPlusClient.getAccountName() + "",
"oauth2:"
+ Scopes.PLUS_PROFILE + " "
+ "https://www.googleapis.com/auth/plus.login" + " "
+ "https://www.googleapis.com/auth/plus.profile.emails.read");
} catch (UserRecoverableAuthException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Intent recover = e.getIntent();
startActivityForResult(recover, 125);
return "";
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (GoogleAuthException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}