darewreck
darewreck

Reputation: 2614

Google People API Field parameter not working

There seems to be issue with the google people api.

If you go to the following link to test out the api, https://developers.google.com/apis-explorer/#p/people/v1/people.people.connections.list

try:

GET https://people.googleapis.com/v1/people/me/connections?sortOrder=FIRST_NAME_ASCENDING&fields=connections(emailAddresses%2Cnames)&key={YOUR_API_KEY}

The results does not display the email address of the contact even thou it is specified in the fields.

Thanks, Derek

Upvotes: 0

Views: 429

Answers (1)

Michael Olsen
Michael Olsen

Reputation: 424

You want to supply the requestMask parameter and ask for the email addresses and names explicitly:

This updated query should work:

https://people.googleapis.com/v1/people/me/connections?sortOrder=FIRST_NAME_ASCENDING&requestMask.includeField=person.emailAddresses,person.names&fields=connections(emailAddresses%2Cnames)&key={YOUR_API_KEY}

Upvotes: 1

Related Questions