Google联系人API提取与联系人组相关的联系人 [英] Google Contact API Fetch Contacts related to a Contact Group
问题描述
我想知道如何获取与某个群组相关的所有联系人。
假设我有一个名为我的特殊群组的联系人组,并且ID是xxxxxxx.I只是想在我的特殊群组中检索联系人。
我已经尝试了这个Request URI并在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。
结果是:
< errors xmlns =http://schemas.google.com/g/ 2005\" >
<错误>
< domain> GData< / domain>
< code>无效< / code>
< internalReason>假设群组xxxxxxxx不与模板< / internalReason>匹配
< / error>
< /错误>
检索与特定组相关的联系人的正确请求URI是什么?
已经围绕着stackoverflow&答案正是我在上面做的。它失败了。
好的伙计。我找到了答案。这是。假设的请求URI检索与联系人组相关的联系人,如下所示:
https://www.google.com/m8/feeds/contacts/default/full?&group=http://www.google.com/m8/feeds/groups/yourmail%40gmail.com / base / xxxxxxx
其中xxxxxx是联系人组ID。
在此之前, m使用此请求URI:
https:/ /www.google.com/m8/feeds/contacts/default/full?&group=xxxxxxx
其中xxxxxx是联系人组ID,而结果是会失败,因为我只是把组ID,而不是使用全部uri联系人组。
所以这一切,希望它的帮助。
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.
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.
这篇关于Google联系人API提取与联系人组相关的联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!