Reputation: 400
I would like to know how to get all contacts related to a group. Let's say I have a contact group named "My Special Group" and the ID is xxxxxxx.I just want to retrieve contact under the "My Special Group" only.
I have already tried this Request URI and test it on oauth2 playground:
https://www.google.com/m8/feeds/contacts/default/full/?group=xxxxxxx.
https://www.google.com/m8/feeds/contacts/myemail%40gmail.com/full/?group=xxxxxxx.
And the result is:
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<internalReason>Supposed groupUri xxxxxxxxdoes not match template</internalReason>
</error>
</errors>
What exactly the correct Request URI to retrieving contacts related to specific group?
Already walked around stackoverflow & the answer is exactly what I do above.Its failed.
Upvotes: 0
Views: 950
Reputation: 400
Okay fellas. I found the answer.Here it is.
The supposed Request URI to retrieve contacts related to a contact group is like this: https://www.google.com/m8/feeds/contacts/default/full?&group=http://www.google.com/m8/feeds/groups/yourmail%40gmail.com/base/xxxxxxx
where xxxxxx is the contact group id.
Before this I'm using this Request URI : https://www.google.com/m8/feeds/contacts/default/full?&group=xxxxxxx
where xxxxxx is the contact group id and the result is will be failed because I'm just put the group id instead of use full uri of contacts group .
So that's all.Hope its help.
Upvotes: 5