User's phone numbers and other details will be fetched only if the user has added them to their Google profile.
If you are using Try this API tool and with 'resourceName = people/me', then :
- you should be logged in with your Google account and
- give your consent to allow the google API explorer tool to access logged in user's (in this case your) profile details. See example here.
After the consent is given by you, it will be able to fetch 'phoneNumbers' and 'addresses' for the logged in user.
If you want to access other user's profile or you are calling the API from any other source then:
the user must give permission to your app/website/program to access the requested information from his/her profile
you must include 'authorization' KEY in GET REQUEST HEADERS with VALUE "Bearer (OAuth accesstoken of the target user)" to get personal details from the target user's profile.
The OAuth accesstoken can be obtained directly from the user consent response or by exchanging refreshtoken for accesstoken.