简介
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助 People API,您可以:
- 读取和管理经过身份验证的用户的通讯录
- 读取并复制经过身份验证的用户的“其他联系人”
- 读取通过身份验证的用户及其联系人的个人资料信息
- 读取网域个人资料和联系人
例如,假设经过身份验证的用户 Jen 的私密联系人中含有 Fabian 和 Ranjith。当您的应用调用 people.connections.list
以读取她的连接列表时,Jen 会显示一个同意屏幕,请求授予该应用访问该列表的权限。如果 Jen 同意,应用会针对 Fabian 和 Ranjith 读取包含 person resources
的列表。
如果应用需要特定人员的信息,它就可以调用 people.get
并传入资源名称,以获取该人员的 person resource
。
应用还可以通过以下方式管理联系人:使用 people.createContact
创建新联系人;使用 people.updateContact
更新它已从 people.connections.list
读取的现有联系人;使用 people.deleteContact
删除联系人。
Google Workspace 用户还可以使用 people.listDirectoryPeople
列出其目录网域个人资料和网域联系人,或使用 people.searchDirectoryPeople
搜索这些信息。
People API 读取的人员信息将从各种来源合并,具体取决于以下条件:
了解合并的个人数据
人物数据派生自一种主要来源类型。如果其他来源的数据通过经过验证的电子邮件地址、电话号码或个人资料网址连接,则这些来源的数据会与这些数据合并。个人的构成方式如下:
变更端点只能修改联系人。不支持个人资料和网域联系人更改。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-06。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-08-06。"],[[["The People API allows reading and managing the authenticated user's contacts, including private contacts and \"Other contacts\"."],["Users can access profile information for authenticated users and their contacts, including public Google profile data and, when permitted, Google Workspace domain profile data."],["The API facilitates managing contacts by creating, updating, and deleting contacts through specific endpoints."],["Google Workspace users can utilize the API to list and search domain profiles and domain contacts."],["The People API merges data from various sources like public profiles, private profiles, contacts, and domain information based on verified email addresses, phone numbers, or profile URLs."]]],["The People API enables reading and managing authenticated user contacts, \"Other contacts,\" and profile information, including domain profiles. Apps can list connections via `people.connections.list`, retrieve specific person data using `people.get`, create contacts with `people.createContact`, update contacts with `people.updateContact`, and delete contacts via `people.deleteContact`. Google Workspace users can access domain contacts using `people.listDirectoryPeople` or `people.searchDirectoryPeople`. The data is merged from sources like public profiles, domain data, and private information, depending on user consent and scopes granted.\n"]]