Method: encryptSecret

  • This document outlines the process for encrypting the OAuth client secret used in account linking flows via an HTTP POST request.

  • The request body for the encryption process requires a JSON object containing the client secret plaintext.

  • A successful response to the encryption request will contain a JSON object with the encrypted account linking client secret and the key version used.

Encrypts 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).

HTTP request

POST https://actions.googleapis.com/v2:encryptSecret

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "clientSecret": string
}
Fields
clientSecret

string

Required. The account linking client secret plaintext.

Response body

If successful, the response body contains data with the following structure:

RPC response for v2.encryptSecret.

JSON representation
{
  "accountLinkingSecret": {
    object (AccountLinkingSecret)
  }
}
Fields
accountLinkingSecret

object (AccountLinkingSecret)

Contains the encrypted account linking client secret and the key version used to encrypt the secret.