Method: users.settings.cse.keypairs.obliterate
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
立即永久删除客户端加密密钥对。您只能永久删除已停用超过 30 天的密钥对。如需关闭密钥对,请使用 keypairs.disable
方法。
Gmail 无法恢复或解密任何使用已抹除的密钥加密的邮件。经过身份验证的用户和 Google Workspace 管理员将无法再读取已加密的消息。
对于管理组织中用户身份和密钥对的管理员,请求需要使用具有全网域授权的服务账号进行授权,才能模拟具有 https://www.googleapis.com/auth/gmail.settings.basic
范围的用户。
对于管理自己的身份和密钥对的用户,请求需要开启并配置硬件密钥加密。
HTTP 请求
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate
网址采用 gRPC 转码语法。
路径参数
参数 |
userId |
string
请求者的主电子邮件地址。如需指明已通过身份验证的用户,您可以使用特殊值 me 。
|
keyPairId |
string
要清除的密钥对的标识符。
|
响应正文
如果成功,则响应正文为空的 JSON 对象。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/gmail.settings.basic
https://www.googleapis.com/auth/gmail.settings.sharing
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: users.settings.cse.keypairs.obliterate\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\nDeletes a client-side encryption key pair permanently and immediately. You can only permanently delete key pairs that have been turned off for more than 30 days. To turn off a key pair, use the [keypairs.disable](/workspace/gmail/api/reference/rest/v1/users.settings.cse.keypairs/disable#caribou.api.proto.MailboxService.DisableCseKeyPair) method.\n\nGmail can't restore or decrypt any messages that were encrypted by an obliterated key. Authenticated users and Google Workspace administrators lose access to reading the encrypted messages.\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/{keyPairId}:obliterate`\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| `keyPairId` | `string` The identifier of the key pair to obliterate. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\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)."]]