Method: users.settings.cse.keypairs.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างและอัปโหลดเชนใบรับรอง S/MIME คีย์สาธารณะสำหรับการเข้ารหัสฝั่งไคลเอ็นต์และข้อมูลเมตาของคีย์ส่วนตัวสำหรับผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
สําหรับผู้ดูแลระบบที่จัดการข้อมูลระบุตัวตนและคู่คีย์สําหรับผู้ใช้ในองค์กร คําขอต้องได้รับอนุญาตด้วยบัญชีบริการที่มีสิทธิ์มอบหมายทั่วทั้งโดเมนเพื่อแอบอ้างเป็นผู้ใช้ที่มีขอบเขต https://www.googleapis.com/auth/gmail.settings.basic
สำหรับผู้ใช้ที่จัดการข้อมูลประจำตัวและคู่คีย์ของตนเอง คำขอจะต้องเปิดและกำหนดค่าการเข้ารหัสคีย์ฮาร์ดแวร์
คำขอ HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/cse/keypairs
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
userId |
string
อีเมลหลักของผู้ขอ หากต้องการระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว ให้ใช้ค่าพิเศษ me
|
เนื้อความของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ CseKeyPair
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ CseKeyPair
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/gmail.settings.basic
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.cse.keypairs.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- [Try it!](#try-it)\n\nCreates and uploads a client-side encryption S/MIME public key certificate chain and private key metadata for the authenticated user.\n\nFor administrators managing identities and keypairs for users in their organization, requests require authorization with a [service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) that has [domain-wide delegation authority](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#delegatingauthority) to impersonate users with the `https://www.googleapis.com/auth/gmail.settings.basic` scope.\n\nFor users managing their own identities and keypairs, requests require [hardware key encryption](https://support.google.com/a/answer/14153163) turned on and configured.\n\n### HTTP request\n\n`POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/cse/keypairs`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string` The requester's primary email address. To indicate the authenticated user, you can use the special value `me`. |\n\n### Request body\n\nThe request body contains an instance of [CseKeyPair](/workspace/gmail/api/reference/rest/v1/users.settings.cse.keypairs#CseKeyPair).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [CseKeyPair](/workspace/gmail/api/reference/rest/v1/users.settings.cse.keypairs#CseKeyPair).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/gmail.settings.basic`\n- `\n https://www.googleapis.com/auth/gmail.settings.sharing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]