Method: encryptSecret
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Mã hoá mật khẩu ứng dụng OAuth dùng trong các quy trình liên kết tài khoản. Có thể dùng cách này để mã hoá khoá bí mật ứng dụng khách lần đầu tiên (ví dụ: trước lần đẩy đầu tiên hoặc sau khi thay đổi mật khẩu ứng dụng khách) hoặc để mã hoá lại mật khẩu ứng dụng khách bằng phiên bản khoá chính mới nhất (xem xét việc xoay vòng khoá).
Yêu cầu HTTP
POST https://actions.googleapis.com/v2:encryptSecret
URL sử dụng cú pháp Chuyển mã gRPC.
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"clientSecret": string
} |
Trường |
clientSecret |
string
Bắt buộc. Văn bản thuần tuý của khoá ứng dụng khách liên kết tài khoản.
|
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Phản hồi RPC cho v2.encryptSecret.
Trường |
accountLinkingSecret |
object (AccountLinkingSecret )
Chứa mật khẩu ứng dụng khách liên kết tài khoản đã mã hoá và phiên bản khoá dùng để mã hoá khoá bí mật.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]