Filtering connections by group or label

235 views Asked by At

The Google People API allows you to get a list of all contacts:

  resultset = service.people().connections().list(
  resourceName='people/me',
  pageSize=100,
  personFields=('names,emailAddresses,organizations,photos,phoneNumbers'))

Is there any way to filter the results by Contact Group? I couldn't find the source code for the list method ...

Thanks!

1

There are 1 answers

1
Amos Yuen On BEST ANSWER

There isn't a way to filter by contact group in the list call. The two options you have are:

  1. Do a get on the contact group to get a list of personIds in the contact group. Then do a batchget to get all the personIds.
  2. Get all contacts and filter them yourself