问题描述
我已经使用Google Contact API检索了我的所有联系人.现在,我想使用此人员API GET 链接.但是我在发出请求的响应中没有看到任何ID.
I have retrieved all my contacts using Google Contact API. Now, i want to get the google profile info of all those contacts using the get request as mentioned in this People API GET link. But i do not see any id in the response to make a request.
推荐答案
Contacts API和People API是独立的API,并不意味着可以相互交互.
The Contacts API and People API are separate API's not meant to interop with each other.
也就是说,反向工程的方法是获取Contacts API联系人ID,解析该十六进制值,将其转换为十进制,并在其上添加一个'c'前缀,这成为People API人员资源ID.
That said, the reverse engineered way to do this is to take the Contacts API contact ID, parse that hexadecimal value, convert it to decimal, and add a 'c' prefix to it, and that becomes the People API person resource ID.
例如如果Contacts API联系人ID为 100
,则People API人员ID为 c256
.当您以这种方式从People API中获取联系人时,它将具有已加入的个人资料信息(如果有的话).
e.g. if the Contacts API contact ID was 100
, then the People API person ID would be c256
. When you fetch contacts from the People API in this fashion, it'll have the joined profile information, if present.
这篇关于我有什么方法可以从Google Contact API v3检索account_id来向Google People API发出获取请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!