androidgmailgoogle-plusgmail-api

how to get email address using this scope from google plus integration


I tried this URL https://www.googleapis.com/auth/userinfo.profile in android oauth, while google plus integration in my application.

Getting the following json and this json array does't contain the email address like this

profile{"displayName":"Devarajan Mahalingam","gender":"male",
"id":"101222514586833333269",
"image":{"url":"https://"}

am getting all details except email address.I need to get email address..


Solution

  • You need to parse the scope like this

    String SCOPE = "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile";