Vijay
Vijay

Reputation: 121

SortOrder Not Working in Google People List Connections API When Called with requestSyncToken=true

When calling the people.connections.list API with requestSyncToken=true, the sortOrder parameter does not function as expected. Even when a sort order such as LAST_MODIFIED_ASCENDING or LAST_MODIFIED_DESCENDING is specified, the returned contacts are not sorted accordingly. This behavior makes it difficult to fetch the most recently updated or edited contacts in a sorted order during synchronization.

We attempted to call the API with requestSyncToken=true and provided the sortOrder parameter (e.g., LAST_MODIFIED_DESCENDING). However, the response did not reflect the specified sort order, and the contacts appeared in an unsorted sequence.

Interestingly, when the requestSyncToken parameter is not sent or explicitly set to false, the API behaves as expected—the sortOrder parameter works correctly, returning contacts in the desired order.

We expected the sortOrder parameter to function consistently, regardless of whether synchronization mode was enabled.

Could you clarify if this behavior is intended, a limitation of the API, or a potential bug?

Upvotes: 6

Views: 69

Answers (1)

Justin Poehnelt
Justin Poehnelt

Reputation: 3459

According to the documentation at https://developers.google.com/people/api/rest/v1/people.connections/list#sortorder, SortOrder only works when sync is not requested.

The order in which a list of connections should be sorted. This is only used if sync is not requested.

Upvotes: 0

Related Questions