Method: encryptSecret
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
对账号关联流程中使用的 OAuth 客户端密钥进行加密。这可用于首次加密客户端密钥(例如在首次推送之前或更改客户端密钥后),或使用最新的主密钥版本重新加密客户端密钥(考虑密钥轮替)。
HTTP 请求
POST https://actions.googleapis.com/v2:encryptSecret
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"clientSecret": string
} |
字段 |
clientSecret |
string
必需。账号关联客户端密钥明文。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
v2.encryptSecret 的 RPC 响应。
字段 |
accountLinkingSecret |
object (AccountLinkingSecret )
包含已加密的账号关联客户端密钥和用于加密该密钥的密钥版本。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eEncrypts the OAuth client secret used in account linking flows for initial encryption, re-encryption, or key rotation.\u003c/p\u003e\n"],["\u003cp\u003eSends an HTTP POST request to \u003ccode\u003ehttps://actions.googleapis.com/v2:encryptSecret\u003c/code\u003e with the client secret in the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a JSON object with the \u003ccode\u003eclientSecret\u003c/code\u003e field containing the plaintext client secret.\u003c/p\u003e\n"],["\u003cp\u003eThe response body, upon success, includes the encrypted account linking client secret and the encryption key version within an \u003ccode\u003eaccountLinkingSecret\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["# Method: encryptSecret\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.EncryptSecretResponse.SCHEMA_REPRESENTATION)\n\nEncrypts the OAuth client secret used in account linking flows. This can be used to encrypt the client secret for the first time (e.g. before the first push or after changing the client secret) or to re-encrypt a client secret using the latest primary key version (considering key rotation).\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2:encryptSecret`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|------------------------------------|---|\n| ``` { \"clientSecret\": string } ``` |\n\n| Fields ||\n|----------------|-----------------------------------------------------------------|\n| `clientSecret` | `string` Required. The account linking client secret plaintext. |\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nRPC response for v2.encryptSecret.\n\n| JSON representation ||\n|----------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"accountLinkingSecret\": { object (/assistant/actions/api/reference/rest/v2/AccountLinkingSecret) } } ``` |\n\n| Fields ||\n|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `accountLinkingSecret` | `object (`[AccountLinkingSecret](/assistant/actions/api/reference/rest/v2/AccountLinkingSecret)`)` Contains the encrypted account linking client secret and the key version used to encrypt the secret. |"]]