Based on the documentation of Google People API I am using profile scope - https://www.googleapis.com/auth/user.phonenumbers.read and PersonFields=phoneNumbers to read the authenticated user's phone numbers only in their Google profile (none from the contact list). I am using API key and oAuth accesstoken to authorise the request. The google people API is not fetching the phone numbers associated with the profile with the above scope alone. Adding the scope for the entire contact list read access in addition to the above scope, which is www.googleapis.com/auth/contacts.readonly returns the phone numbers from the profile correctly. Is there any way to get user's phone numbers from his/her profile using only the user.phonenumbers.read scope?
相关问题
- Invalidate Google Cloud CDN cache from the backend
- Getting 'Missing required field: member' w
- Script fails on SpreadsheetApp.openById - Requires
- File upload via REST v3 appears as “Untitled”
- YouTube Data API v3 allowed referers for browser a
相关文章
- How to embed Google Speech to Text API in Python p
- Does google-hosted jquery helps google to track vi
- Is there a google API to read cached content? [clo
- Creating GoogleApiClient for multiple activities
- Google Calendar - Permission to Access
- Google OAuth 2.0 User id datatype for MYSQL
- Google OAuth 2: response_type error on token reque
- Google OAuth 2 redirect_uri_mismatch - OmniAuth Ra
I could figure out the problem. For 'user.phonenumbers.read' scope the documentation of people API states - 'your app be given read access to the authenticated user's phone numbers in their Google profile'.
But by 'Google profile' it indicates the Google Plus Profile which is completely different form their core google profile - My Account. People API is fetching information only from the Google Plus Profile.
So even if a user has his/her contact details added in My Account, the People API will not fetch their phone numbers unless they have added them manually in their Google Plus Profile. After adding the contact details I could fetch contact details with 'auth/user.phonenumbers.read' without the need of adding 'auth/contacts.readonly' scope.