Method: accounts.getAdBlockingRecoveryTag

  • This document outlines how to get the ad blocking recovery tag for an AdSense account using a GET request to the specified URL.

  • The request requires a name path parameter specifying the target account in the format accounts/{account}.

  • The request body must be empty.

  • The response body contains the tag and an optional errorProtectionCode which can be used with the tag to display a message if the tag is blocked.

  • Access requires either the https://www.googleapis.com/auth/adsense or https://www.googleapis.com/auth/adsense.readonly OAuth scope.

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