Google Contacts API vs People API [英] Google Contacts API vs People API
问题描述
我在上面的2个API中遇到问题。鉴于下一种情况:我有2个不同的谷歌帐户。一个不使用Google+和使用Google+的第二个帐户
在不使用Google+的第一个帐户上使用联系人API时,我可以看到我所有的联系人:
GET / m8 / feeds / contacts /< email> / full
与使用Google +的第二个帐户相同。
当我使用People API第一个不使用Google+的帐户,我收到了一个空的回复(实际上我只是获取下一个同步令牌:
GET https://people.googleapis.com/v1/people/me/connections
下一个范围:
https://www.googleapis.com/auth/contacts
$ c $ {$ b $ <
$ bnextSyncToken:CMe6 ....
}
第二个帐户(使用Google+)的作用就像一个魅力
2 acc数量是Google+,People API只适用于使用Google+的帐户吗?或者它是我错过的其他东西
解决方案我发现两个API之间的区别,它与无关其中一个帐户连接到Google+的事实
People API
只会获取联系人在我的联系人
联系人帐户下,而联系人API
也将获取其他联系人列表(其他联系人
,最多联系人
,...)
I'm having a problem with the 2 APIs above. Given the next scenario: I have 2 different google accounts. One that doesn't use Google+ and a second account that uses Google+
When using Contacts API on the first account that doesn't use Google+ I can see all my contacts:
GET /m8/feeds/contacts/<email>/full
Same for the second account that uses Google+.
When I'm using People API for the first account that doesn't use Google+, I'm getting an empty response (actually I'm getting just the next sync token:
GET https://people.googleapis.com/v1/people/me/connections
With the next scope:
https://www.googleapis.com/auth/contacts
Returns:
{
"nextSyncToken": "CMe6...."
}
The same call for the second account (with Google+) works like a charm
The only difference between the 2 accounts is Google+, is it possible that People API only works for accounts with Google+? Or is it something else that I'm missing
解决方案 I found the difference between the 2 APIs and it has nothing to do with the fact that one of the accounts is connected to Google+ or not
People API
will only fetch the contacts that are under the account "My contacts"
contacts, while Contacts API
will also fetch the other contacts lists ("Other contacts"
, "Most contacts"
, ...)
这篇关于Google Contacts API vs People API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!