Method: setWebAndAppActivityControl

  • The setWebAndAppActivityControl method is used to enable or disable the Web & App Activity setting for a service account.

  • This setting must be enabled for a service account to use call Actions and only needs to be set once unless later disabled.

  • The HTTP request method is POST to the endpoint https://actions.googleapis.com/v2:setWebAndAppActivityControl.

  • The request body is a JSON object with a single boolean field named enabled to indicate the desired state of the setting.

  • A successful response to the request will have an empty body.

Sets the Web & App Activity control on a service account.

It is necessary to have this setting enabled in order to use call Actions. The setting is originally disabled for service accounts, and it is preserved until set to a different value. This means it only needs to be enabled once per account (and not necessarily once per test), unless it is later disabled.

Returns an error if the caller is not a service account. User accounts can change this setting via the Activity Controls page. See https://support.google.com/websearch/answer/54068.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "enabled": boolean
}
Fields
enabled

boolean

Whether the setting should be set to an enabled or disabled state.

Response body

If successful, the response body is empty.