管理聯絡人委派代表
本指南說明如何建立、列出及刪除聯絡人委派對象。
建立委派作業
如要為使用者建立委派,請建立包含委派者電子郵件地址的 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 和/或其關聯企業的註冊商標。
上次更新時間:2023-09-14 (世界標準時間)。
[null,null,["上次更新時間: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"]]