6
votes

We use Google Contacts API to get contact entries that are updated after a specific time to keep an updated copy of the contacts on our end.

In Google Contacts API, there is an option to get the contact entries updated after a specific time using "updated-min" query parameter.

GET https://www.google.com/m8/feeds/contacts/default/full?updated-min=2007-03-16T00:00:00

There is no option specified in Google People API for such a case in Google People documentation. Am I missing anything or is this feature not given?

1
I'm not seeing any documentation about it. Seems like the query parameters page was already updated and earliest it was crawled by archive sites was september 2020, (already like what it is now). I'd like to assume, (unless it was confirmed by other users by testing and making it work) this feature is still not implemented.NightEye
Although, an alternative seems to be available as seen on the migration guide and you can make use of update_time. Since Contacts is deprecated and scheduled for sunset on June 15, 2021, It's better if you try and make it work using update_time by fetching all contact entries and then filtering them by their update_time. This may be the closest thing you might have to work on.NightEye
A better way is to filter them by getting the last updated time of the person (contact) which is given in the sources param of Person object. But it seems like unnecessary work. To get the 10 or so contacts which have been last updated, having to fetch all the contacts (which has a max limit of 25,000).Ranjani

1 Answers

3
votes

If you're trying to implement an incremental sync where you want all the contacts that were changed (or created/deleted) since the last sync time, then instead of using a time object you can use syncToken.

It works like this - you first call people.connections.list without a syncToken, and with requestSyncToken true. The last response page will include a field syncToken which you can send in future people.connections.list calls to get only the resources changed since the last request.

See this: https://developers.google.com/people/api/rest/v1/people.connections/list#query-parameters