Method: users.settings.delegates.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เพิ่มผู้รับมอบสิทธิ์โดยตั้งค่าสถานะการยืนยันเป็น accepted
โดยตรง โดยไม่ต้องส่งอีเมลยืนยัน ผู้ใช้ที่ได้รับมอบสิทธิ์ต้องเป็นสมาชิกขององค์กร Google Workspace เดียวกันกับผู้ใช้ที่มอบสิทธิ์
Gmail จำกัดจำนวนผู้รับมอบสิทธิ์และผู้มอบสิทธิ์ที่ผู้ใช้แต่ละรายในองค์กร Google Workspace สามารถทำได้ ขีดจำกัดเหล่านี้ขึ้นอยู่กับองค์กรของคุณ แต่โดยทั่วไปแล้ว ผู้ใช้แต่ละรายจะมีผู้รับมอบสิทธิ์ได้สูงสุด 25 คนและผู้มอบสิทธิ์ได้สูงสุด 10 คน
โปรดทราบว่าผู้ใช้ที่รับมอบสิทธิ์ต้องอ้างอิงด้วยอีเมลหลัก ไม่ใช่อีเมลแทน
นอกจากนี้ โปรดทราบว่าเมื่อสร้างผู้รับมอบสิทธิ์ใหม่ ระบบอาจใช้เวลาถึง 1 นาทีก่อนที่ผู้รับมอบสิทธิ์ใหม่จะพร้อมใช้งาน
วิธีการนี้ใช้ได้กับลูกค้าบัญชีบริการที่ได้รับการมอบสิทธิ์ทั่วทั้งโดเมนเท่านั้น
คำขอ HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/delegates
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลของผู้ใช้ คุณสามารถใช้ค่าพิเศษ "me" เพื่อระบุผู้ใช้ที่ผ่านการตรวจสอบสิทธิ์
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ Delegate
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ Delegate
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/gmail.settings.sharing
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Method: users.settings.delegates.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nAdds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user.\n\nGmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators.\n\nNote that a delegate user must be referred to by their primary email address, and not an email alias.\n\nAlso note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.\n\n### HTTP request\n\n`POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/delegates`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------|\n| `userId` | `string` User's email address. The special value \"me\" can be used to indicate the authenticated user. |\n\n### Request body\n\nThe request body contains an instance of [Delegate](/workspace/gmail/api/reference/rest/v1/users.settings.delegates#Delegate).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Delegate](/workspace/gmail/api/reference/rest/v1/users.settings.delegates#Delegate).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/gmail.settings.sharing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]