Method: users.settings.cse.keypairs.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出已通过身份验证的用户的客户端加密功能密钥对。
对于管理组织中用户身份和密钥对的管理员,请求需要使用具有全网域授权的服务账号进行授权,才能模拟具有 https://www.googleapis.com/auth/gmail.settings.basic
范围的用户。
对于管理自己的身份和密钥对的用户,请求需要开启并配置硬件密钥加密。
HTTP 请求
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/cse/keypairs
网址采用 gRPC 转码语法。
路径参数
参数 |
userId |
string
请求者的主电子邮件地址。如需指明已通过身份验证的用户,您可以使用特殊值 me 。
|
查询参数
参数 |
pageToken |
string
分页令牌,用于指明要返回的键值对页面。如果未提供令牌,则 API 将返回第一页的结果。
|
pageSize |
integer
要返回的键对数量。如果未提供,则每页数据大小将默认为 20 条条目。
|
响应正文
JSON 表示法 |
{
"cseKeyPairs": [
{
object (CseKeyPair )
}
],
"nextPageToken": string
} |
字段 |
cseKeyPairs[] |
object (CseKeyPair )
为用户安装的 CSE 密钥对列表的其中一页。
|
nextPageToken |
string
要传递给后续 keypairs.list 调用以检索下一页密钥对的分页令牌。如果未返回此值,则表示没有其他页面。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/gmail.settings.basic
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
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.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListCseKeyPairsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists client-side encryption key pairs for an 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`GET 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### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageToken` | `string` Pagination token indicating which page of key pairs to return. If the token is not supplied, then the API will return the first page of results. |\n| `pageSize` | `integer` The number of key pairs to return. If not provided, the page size will default to 20 entries. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"cseKeyPairs\": [ { object (/workspace/gmail/api/reference/rest/v1/users.settings.cse.keypairs#CseKeyPair) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cseKeyPairs[]` | `object (`[CseKeyPair](/workspace/gmail/api/reference/rest/v1/users.settings.cse.keypairs#CseKeyPair)`)` One page of the list of CSE key pairs installed for the user. |\n| `nextPageToken` | `string` Pagination token to be passed to a subsequent keypairs.list call in order to retrieve the next page of key pairs. If this value is not returned, then no further pages remain. |\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://mail.google.com/`\n- `\n https://www.googleapis.com/auth/gmail.modify`\n- `\n https://www.googleapis.com/auth/gmail.readonly`\n- `\n https://www.googleapis.com/auth/gmail.settings.sharing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]