Method: accounts.getAdBlockingRecoveryTag
Stay organized with collections
Save and categorize content based on your preferences.
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-28 UTC.
[null,null,["Last updated 2025-02-28 UTC."],[[["\u003cp\u003eRetrieves the ad blocking recovery tag for a specified AdSense account.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the account name as a path parameter and an empty request body.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides the ad blocking recovery tag and an optional error protection code.\u003c/p\u003e\n"],["\u003cp\u003eThe tag can be used to display a message to users whose ad blockers are interfering with website access.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires specific OAuth scopes related to AdSense account access.\u003c/p\u003e\n"]]],["This content describes retrieving an ad blocking recovery tag for an account using a `GET` request to the specified URL (`https://adsense.googleapis.com/v2/{name=accounts/*}/adBlockingRecoveryTag`). The account `name` is a required path parameter. The request body must be empty. The response includes a JSON representation containing the `tag` and `errorProtectionCode`, both of type string. Access requires either the `adsense` or `adsense.readonly` OAuth scope. The `tag` is used for recovery and the `errorProtectionCode` to show a message if an ad-blocker is present.\n"],null,["# Method: accounts.getAdBlockingRecoveryTag\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.AdBlockingRecoveryTag.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the ad blocking recovery tag of an account.\n\n### HTTP request\n\n`GET https://adsense.googleapis.com/v2/{name=accounts/*}/adBlockingRecoveryTag`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the account to get the tag for. Format: accounts/{account} |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nRepresentation of an ad blocking recovery tag. See \u003chttps://support.google.com/adsense/answer/11575177\u003e.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------|\n| ``` { \"tag\": string, \"errorProtectionCode\": string } ``` |\n\n| Fields ||\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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. |\n| `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](https://support.google.com/adsense/answer/11575480). |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/adsense`\n- `\n https://www.googleapis.com/auth/adsense.readonly`"]]