管理聯絡人委派功能
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本指南將說明如何建立、列出及刪除聯絡人委派代表。
建立委派作業
如要為使用者建立委派者,請建立包含委派者電子郵件地址的 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
狀態碼。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-25 (世界標準時間)。
[null,null,["上次更新時間: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."]]