I use the PHP google api with OAuth2.
ALL the process of the token procees has been successfuly completed.
I use the scopes:
$a_scopes = array(
Google_Service_Oauth2::USERINFO_EMAIL,
Google_Service_Oauth2::PLUS_ME,
'https://mail.google.com/mail/feed/atom'
);
$this->client->setScopes($a_scopes);
I use the code to retrieve the emails:
$plus = new Google_Service_Plus($this->client);
$person = $plus->people->get('me');
$user = $person->getEmails();
echo("<pre>");var_dump($user);die("</pre>");
The result:
array(1) {
[0]=>
object(Google_Service_Plus_PersonEmails)#29 (4) {
["type"]=>
string(7) "account"
["value"]=>
string(17) <My Email>
["modelData":protected]=>
array(0) {
}
["processed":protected]=>
array(0) {
}
}
}