Google Contacts API vs People API

 ̄綄美尐妖づ 提交于 2019-11-26 06:48:21

问题


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


回答1:


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", ...)



来源:https://stackoverflow.com/questions/36386957/google-contacts-api-vs-people-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!