Documentation for the requested version is not available.Documentation for the requested diff is not available.
The AdSense API sandbox is a replica of the live API services but with some additional support that helps developers test and debug their applications. A developer can use the sandbox to simulate creating an AdSense account for new or existing publishers (or create an AdSense account with no association with a developer), associate those accounts with their own developer account, and then test operations on that account.
The sandbox versions of the WSDLs are located at:
https://sandbox.google.com/api/adsense/vN/SERVICE_NAME?wsdl
For example:
https://sandbox.google.com/api/adsense/v3/AccountService?wsdl
The sandbox has special header elements used for testing and debugging that can be included in a header with request createAdSenseAccount.
Accounts Deleted Once a Month - All sandbox accounts and data are deleted from the sandbox approximately once a month. The pre-populated data for the testsandboxpub@google.com test account is restored as roughly a superset of its previous data (data might not be visible if a channel has been deleted, for example).
Ads Do Not Show - Ad code from the sandbox will not generate live ads. Instead you will see a blank box, public service ads, or whatever is specified by the alternate parameter. This is expected behavior and we will look at the source code of the page when we review applications.
In order to log in and run tests on the sandbox, you'll need a username and password for a sandbox developer account. If you do not already have login credentials, please complete the AdSense API developer info form and you will receive an email with further instructions. If you do not receive one, please let us know by emailing us at adsenseapi-support@google.com.
To begin with, the developer account is associated with one user account (testsandboxpub@google.com). This user account is pre-populated with report data. This account will come in handy if you are planning to integrate reporting features into your website since sandbox accounts do not accumulate clicks and impressions. We publish sample code for generating an AFC aggregate report for Java, Perl, PHP, Python and C#.
- test publisher account
- username: testsandboxpub@google.com
- client_id: Find its current value at Developer Knowledge Base in the form: ca-pub-################.
- NOTE: The client_id may change monthly with each refresh of the sandbox data.
The sandbox environment allows developers to test the creation of new accounts and association with existing accounts in preparation for release on the live web services.
The live web services require that when a developer creates an account for a publisher, that publisher receives an email which asks them to go to a web page to perform various actions. (For the larger context, see Setting up a Publisher's Account). The sandbox sends the email request to you, the developer (instead of the publisher), which lets you see the messages the publisher would have seen. However, the verification link in that email will not work, because the sandbox doesn't have a replica of the AdSense website to take a publisher to. The special request header elements provide a way to simulate these and other actions related to createAdSenseAccount.
When creating a new account, there is one case that requires use of a debug header:
Besides creating new AdSense accounts, a developer can manage existing AdSense accounts. In order to do so, the developer must create an association with an existing AdSense account. This lets developers test the associateExistingAccount request. In the sandbox environment, there are three special cases that require use of the debug headers:
The sandbox has the following special elements that can be included in a header for request createAdSenseAccount when debugging. These elements enable developers to include zip, phone and approval settings that are normally requested of the publisher by email. These elements can be used in addition to the elements in the normal request header.
These request header elements are optional and can be used only in the sandbox, and only with createAdSenseAccount. They enable you to test association using associateExistingAccount.