Search code examples
javascriptgoogle-contacts-api

Google Contacts Api Getting contacts in a certain group. (The my contacts group)


So I can get all my contacts with this:

https://www.google.com/m8/feeds/contacts/default/full?access_token=mytoken&alt=json&v=3

And all my groups with this:

https://www.google.com/m8/feeds/groups/default/full?access_token=myToken&alt=json&v=3    

And I can get the actual contact group for "myContacts" with this:

https://www.google.com/m8/feeds/groups/default/base/6?access_token=mytoken&alt=json&v=3

But how can I get all the contacts in the myContacts group? The previous query just gives me the actual group.


Solution

  • You can use the below URI in order to get the contacts of a specific group.

    href="http://www.google.com/feeds/contacts/groups/userEmail/base/1234b"/

    For reference and more information check the documentation of the Google Contacts API here in the Retrieving contacts using query parameters section.

    The query parameters (including the group of course) that you may use are listed here in the Contacts query parameters reference.