【问题标题】:Domain Shared Contacts API with Google Apps与 Google Apps 的域共享联系人 API
【发布时间】:2015-10-09 09:32:10
【问题描述】:

我正在使用 Contacts API 获取域中所有联系人的列表,以便向用户提供建议。

我使用“https://www.google.com/m8/feeds/contacts/example.com/full”作为 URL。 错误提示“只有管理员可以请求属于示例的条目”。

如何使用 API 获取域联系人列表? 我可以使用此 URL“https://www.google.com/contacts/?hl=en&tab=wC#contacts/group/27/Directory”从浏览器访问联系人。

请帮忙……!!!

编辑 1(有 Jay 参考):
我的代码是: service.setHeader("GData-Version", "1.0"); ContactFeed contactEntry= service.getFeed(new URL("@987654323@"), ContactFeed.class);

【问题讨论】:

  • 我试过了,得到 com.google.gdata.util.ServiceForbiddenException: Forbidden Version 3.0 is not supported.
  • 尝试设置 service.setHeader("GData-Version", "1.0");没用
  • 它在 OAuth 操场上运行良好。谢谢..!!
  • 如何限制结果数..?

标签: google-apps google-contacts-api google-data-api google-shared-contacts


【解决方案1】:

这对我有用。 $.ajax({ type : "GET", url: "@987654321@", data: { alt: "json", q:query, access_token:access_token, 'max-results':10 }, success: function(data) { } });

范围:@987654322@

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-07
    • 2015-10-15
    • 2015-06-18
    • 1970-01-01
    • 2012-10-02
    • 1970-01-01
    • 2013-03-20
    • 1970-01-01
    相关资源
    最近更新 更多