Method: accounts.getAdBlockingRecoveryTag

  • Retrieves the ad blocking recovery tag for a specified AdSense account.

  • The request requires the account name as a path parameter and an empty request body.

  • The response provides the ad blocking recovery tag and an optional error protection code.

  • The tag can be used to display a message to users whose ad blockers are interfering with website access.

  • Authorization requires specific OAuth scopes related to AdSense account access.

Gets the ad blocking recovery tag of an account.

HTTP request

GET https://adsense.googleapis.com/v2/{name=accounts/*}/adBlockingRecoveryTag

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the account to get the tag for. Format: accounts/{account}

Request body

The request body must be empty.

Response body

Representation of an ad blocking recovery tag. See https://support.google.com/adsense/answer/11575177.

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

JSON representation
{
  "tag": string,
  "errorProtectionCode": string
}
Fields
tag

string

The ad blocking recovery tag. Note that the message generated by the tag can be blocked by an ad blocking extension. If this is not your desired outcome, then you'll need to use it in conjunction with the error protection code.

errorProtectionCode

string

Error protection code that can be used in conjunction with the tag. It'll display a message to users if an ad blocking extension blocks their access to your site.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/adsense
  • https://www.googleapis.com/auth/adsense.readonly