Google 联系人 API 与人 API

Google Contacts API vs People API

我对上面的 2 API 有疑问。假设下一个场景:我有 2 个不同的 google 帐户。一个不使用 Google+ 的帐户和另一个使用 Google+

的帐户

在第一个未使用 Google+ 的帐户上使用联系人 API 时,我可以看到我的所有联系人:

GET /m8/feeds/contacts/<email>/full

第二个使用 Google+ 的帐户也是如此。

当我为第一个不使用 Google+ 的帐户使用 People API 时,我得到一个空响应(实际上我只得到下一个同步令牌:

GET https://people.googleapis.com/v1/people/me/connections

下一个范围:

https://www.googleapis.com/auth/contacts

Returns:

{
  "nextSyncToken": "CMe6...."
}

第二个帐户(Google+)的相同调用非常有效

这两个帐户之间的唯一区别是 Google+,People API 是否只适用于 Google+ 的帐户?还是我遗漏了什么

我发现了这两个 API 之间的区别,这与其中一个帐户是否连接到 Google+ 或未连接到

无关

People API 只会获取帐户 "My contacts" 联系人下的联系人,而 Contacts API 也会获取其他联系人列表("Other contacts""Most contacts", ...)

The People API 是较新的版本。

来自 Google API 与人物 API 相关的页面:

The Google Contacts API will be deprecated in the future. The People API is the recommended replacement for apps that read contact data.

同样重要的是要注意,People API 实际上允许开发人员使用“其他联系人”,就像 Contacts API 所做的那样。此外,迁移时您不必重新征求用户对以下内容的同意:

请参阅这些链接以进一步阅读:

https://developers.google.com/people/related-apis(联系人 API 与人 API) https://developers.google.com/people(人物介绍API)

我基本上只是 copy/pasted 大部分内容,但希望对某些人有所帮助,因为我也很想找到这些答案:)