管理联系人委托
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本指南介绍了如何创建、列出和删除联系人受托人。
创建委托
如需为用户创建受托人,请创建包含受托人的电子邮件地址的 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):2025-03-25。
[null,null,["最后更新时间 (UTC):2025-03-25。"],[],[],null,["# Manage contact delegates\n\nThis guide covers how to create, list, and delete contact delegates.\n\nCreate a delegate\n-----------------\n\nTo create a delegate for a user, create a `POST` request containing the email\naddress of the delegator: \n\n POST https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates\n\nIn the request body, provide the email address for the delegate:\n\n`\n{\n\"email\": \"`\u003cvar translate=\"no\"\u003edelegate\u003c/var\u003e`@example.com\"\n}\n`\n\nA successful response returns an `HTTP 200` status code and the new delegate's\nemail:\n\n`\n{\n\"email\": \"`\u003cvar translate=\"no\"\u003edelegate\u003c/var\u003e`@example.com\"\n}\n`\n\nList delegates\n--------------\n\nTo list delegates for a user's contacts, create a `GET` request containing the\nemail address of that user: \n\n GET https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates\n\nA successful response returns an `HTTP 200` status code and a list of delegate\nemails:\n\n`\n{\n\"email\": \"`\u003cvar translate=\"no\"\u003edelegate1\u003c/var\u003e`@example.com\"\n}\n`\n\nDelete a delegate\n-----------------\n\nTo delete a delegate of a user's contacts, create a `DELETE` request containing\nthe email address of both the delegaor and delegate: \n\n DELETE https://admin.googleapis.com/admin/contacts/v1/users/delegator@example.com/delegates/delegate@example.com\n\nA successful response returns an `HTTP 200` status code."]]