I want to retrieve my contacts names, email address and phone numbers using the Google People API and I\'m using their Try it! tool to test the API.
The name
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 :
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.