【问题标题】:Google Contact API Fetch Contacts related to a Contact GroupGoogle Contact API 获取与联系人组相关的联系人
【发布时间】:2015-04-12 02:32:23
【问题描述】:

我想知道如何获取与群组相关的所有联系人。 假设我有一个名为“我的特殊组”的联系人组,ID 是 xxxxxxx。我只想检索“我的特殊组”下的联系人。

我已经尝试过这个请求 URI 并在 oauth2 操场上进行了测试:

  1. https://www.google.com/m8/feeds/contacts/default/full/?group=xxxxxxx.
  2. https://www.google.com/m8/feeds/contacts/myemail%40gmail.com/full/?group=xxxxxxx.

结果是:

<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>

检索与特定组相关的联系人的正确请求 URI 究竟是什么?

已经在 stackoverflow 周围走来走去,答案正是我上面所做的。它失败了。

【问题讨论】:

    标签: google-api google-contacts-api


    【解决方案1】:

    好的,伙计们。我找到了答案。在这里。

    用于检索与联系人组相关的联系人的假定请求 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。

    在此之前,我使用此请求 URI: https://www.google.com/m8/feeds/contacts/default/full?&group=xxxxxxx

    其中 xxxxxx 是联系人组 id,结果将失败,因为我只是放置组 id 而不是使用联系人组的完整 uri。

    仅此而已。希望对您有所帮助。

    【讨论】:

    • 我仍然遇到同样的错误。有人可以帮忙吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多