Custom phone numbers and other data will only be obtained if the user adds them to his Google profile.
If you use try this API and with 'resourceName = people / me', then:
- you must log in to your Google account and
- give your consent to allow the google API explorer tool to access the profile registered in the user's profile (in this case yours). See an example here.
After you give your consent, he will be able to get "phoneNumbers" and "addresses" for the registered user.
If you want to access another user profile or you are calling the API from any other source, then:
the user must grant permission to your application / website / program to access the requested information from his profile
you must enable KEY "authorization" in GET REQUEST HEADERS with VALUE "Bearer (OAuth accesstoken from target user)" in order to get personal data from the target user profile.
OAuth accesstoken can be obtained directly from a user consent response or by exchanging a refreshtoken for accesstoken.
source share