Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get phone number via Google oAuth2?

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?

like image 997
Blackie123 Avatar asked Nov 07 '12 19:11

Blackie123


People also ask

How do I get a Google API phone number?

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.

Does Google support OAuth2?

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.

How does Google OAuth 2.0 work?

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.


1 Answers

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

like image 141
David Primmer Avatar answered Sep 30 '22 02:09

David Primmer