Environments.reauthorize_environments: update

Requires authorization

Re-generates the authorization code for a GTM Environment. Try it now.

Request

HTTP request

PUT https://www.googleapis.com/tagmanager/v1/accounts/accountId/containers/containerId/reauthorize_environments/environmentId

Parameters

Parameter name Value Description
Path parameters
accountId string The GTM Account ID.
containerId string The GTM Container ID.
environmentId string The GTM Environment ID.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/tagmanager.publish

Request body

In the request body, supply data with the following structure:

{
  "accountId": string,
  "containerId": string,
  "environmentId": string,
  "type": string,
  "fingerprint": string,
  "name": string,
  "description": string,
  "enableDebug": boolean,
  "url": string,
  "authorizationCode": string,
  "authorizationTimestampMs": long,
  "containerVersionId": string
}
Property name Value Description Notes
accountId string GTM Account ID.
containerId string GTM Container ID.
environmentId string GTM Environment ID uniquely identifies the GTM Environment.
type string The type of this environment.

Acceptable values are:
  • "draft"
  • "latest"
  • "live"
  • "user"
fingerprint string The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
name string The environment display name. Can be set or changed only on USER type environments. writable
description string The environment description. Can be set or changed only on USER type environments. writable
enableDebug boolean Whether or not to enable debug by default on for the environment. writable
url string Default preview page url for the environment. writable
authorizationCode string The environment authorization code.
authorizationTimestampMs long The last update time-stamp for the authorization code.
containerVersionId string

Response

If successful, this method returns a response body with the following structure:

{
  "accountId": string,
  "containerId": string,
  "environmentId": string,
  "type": string,
  "fingerprint": string,
  "name": string,
  "description": string,
  "enableDebug": boolean,
  "url": string,
  "authorizationCode": string,
  "authorizationTimestampMs": long,
  "containerVersionId": string
}
Property name Value Description Notes
accountId string GTM Account ID.
containerId string GTM Container ID.
environmentId string GTM Environment ID uniquely identifies the GTM Environment.
type string The type of this environment.

Acceptable values are:
  • "draft"
  • "latest"
  • "live"
  • "user"
fingerprint string The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
name string The environment display name. Can be set or changed only on USER type environments. writable
description string The environment description. Can be set or changed only on USER type environments. writable
enableDebug boolean Whether or not to enable debug by default on for the environment. writable
url string Default preview page url for the environment. writable
authorizationCode string The environment authorization code.
authorizationTimestampMs long The last update time-stamp for the authorization code.
containerVersionId string

Try it!

Use the APIs Explorer below to call this method on live data and see the response.