According to OpenID specification it should be possible http://openid.net/specs/openid-attribute-properties-list-1_0-01.html however there is no mention of it in Google OAuth2 Documentation. Anyone have experience with that?
Visit this link. Select https://www.googleapis.com/auth/user.phonenumbers.read permission in People API v1 section. Click on Authorize API. Choose the account to log in.
Google APIs use the OAuth 2.0 protocol for authentication and authorization. Google supports common OAuth 2.0 scenarios such as those for web server, client-side, installed, and limited-input device applications. To begin, obtain OAuth 2.0 client credentials from the Google API Console.
OAuth 2.0 allows users to share specific data with an application while keeping their usernames, passwords, and other information private. For example, an application can use OAuth 2.0 to obtain permission from users to store files in their Google Drives. This OAuth 2.0 flow is called the implicit grant flow.
We don't currently offer the phone number as part of our people/get Google+ API.
https://developers.google.com/+/api/latest/people
Visibility of attributes in this api are controlled by the user in G+ profile settings.
The userinfo api is specific to OpenId and probably won't get this field.
https://developers.google.com/accounts/docs/OAuth2Login#userinfocall
It may happen in the future and we're open to requests.
davep
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With