管理联系人委托
本指南介绍了如何创建、列出和删除联系人受托人。
创建受托人
如需为用户创建受托人,请创建一个包含受托人电子邮件地址的 POST
请求:
POST https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates
在请求正文中,提供委托人的电子邮件地址:
{
“email”: “delegate@example.com”
}
如果响应成功,将返回 HTTP 200
状态代码和新受托人的电子邮件地址:
{
“email”: “delegate@example.com”
}
列出受托人
如需列出用户联系人的受托人,请创建一个包含该用户的电子邮件地址的 GET
请求:
GET https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates
成功的响应将返回 HTTP 200
状态代码和受托电子邮件列表:
{
“email”: “delegate1@example.com”
}
删除受托人
如需删除用户联系人的受托人,请创建一个包含委托人和受托人电子邮件地址的 DELETE
请求:
DELETE https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates/delegate@example.com
成功的响应将返回 HTTP 200
状态代码。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-09-14。
[null,null,["最后更新时间 (UTC):2023-09-14。"],[[["This guide explains how to manage contact delegates, enabling users to grant access to their contacts to other users."],["You can create a new contact delegate by sending a POST request with the delegator's and delegate's email addresses."],["Retrieve a list of existing delegates for a user using a GET request with the delegator's email address."],["Remove a delegate's access by sending a DELETE request specifying both the delegator's and delegate's email addresses."]]],["This guide outlines managing contact delegates via API requests. To create a delegate, send a `POST` request with the delegate's email to the delegator's endpoint. Listing delegates requires a `GET` request to the delegator's endpoint, which returns a list of delegate emails. Deleting a delegate involves a `DELETE` request, including both the delegator and delegate's email in the URL. Successful requests return an `HTTP 200` status.\n"]]