Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
Documentation for the requested version is not available.Documentation for the requested diff is not available.
The sandbox is a testing and development environment that replicates the functionality of the AdWords API web services. You can use the sandbox to:
Note: The sandbox is not meant to be used for load testing.
To access the sandbox, you must first have a Google account. You can use an existing account or create a new one. You will use this account's email address and password to set the required sandbox request headers.
You use the AdWords API sandbox by connecting to the sandbox-specific versions of the WSDLs instead of the production versions.
When you first access a web service in the sandbox, five sandbox client accounts are automatically created for you. You can work with these client accounts by setting the clientEmail header appropriately.
Your sandbox account starts out empty. You can create new campaigns, ad groups, and ads, and they will be saved to your sandbox account.
Caution: Do not rely on the sandbox to store data for long periods of time. The sandbox is periodically cleared of user and account data, usually once a month.
While you can write and read campaign data as usual, services that provide statistical data (such as TrafficEstimatorService and ReportService) will return intentionally false information. For more information on the behavior of these services, see the following sections in this document:
The sandbox WSDL URLs are identical to their production counterparts, except they use the sandbox.google.com domain instead of adwords.google.com. For example, the sandbox version of the v12 CampaignService is located at the following URL:
https://sandbox.google.com/api/adwords/v12/CampaignService?wsdl <!-- sandbox URL -->
The AdWords API SOAP headers for the sandbox are similar to the standard request headers, and must be set with the following data:
| Header | Value | Comment |
|---|---|---|
email |
login_id | Email address for the account being accessed. Must be for a valid Google account. Example: joe@gmail.com |
password |
password | Password for the Google account used in the email header |
useragent |
application_user_agent | An arbitrary string that identifies the customer sending the request (should be the same value the application will use in the production environment) |
developerToken |
login_id++currency_code |
A string that identifies you as an authorized user of the sandbox. Must be the same login_id used in the email header, followed by ++ and the currency code used by the account.
Example: Also see Note on Currency Code. |
applicationToken |
22_character_string |
Ignored in sandbox
A string that identifies an application as being authorized to call the AdWords API web services. |
clientEmail |
client_n+login_id |
Optional.
A header element to be used when a My Client Center (MCC) account edits a client's account. If this header is present, it must have the form Example: |
To simplify the use of the sandbox, MCC and Client accounts are
created on the fly if they don't already exist in the system.
This means sandbox users do not need to go through a registration
process. Since the registration process normally allows you to set the account's currency code, sandbox users must provide the currency code in the developerToken header instead. The currency code cannot be changed after the account has been created.
Because sandbox users do not have knowledge or control over when their MCC and Client accounts are created, they must always provide the currency code in the token. Then, if the accounts are implicitly created during a particular request, that currency code will be set for the accounts. If the accounts are already created, then the currency code is ignored. Note that if the token does not include the currency code, the request will fail.
Policy checking is modified in the sandbox such that only repeated punctuation will trigger a policy violation.
The sandbox discards any uploaded images and returns the following information for Image objects:
| Field | Value |
|---|---|
| height | 60 |
| imageUrl | https://sandbox.google.com/sandboximages/image.jpg |
| mimeType | image/jpeg |
| shrunkenUrl | https://sandbox.google.com/sandboximages/shrunken.jpg |
| thumbnailUrl | https://sandbox.google.com/sandboximages/thumbnail.jpg |
| type | image |
| width | 468 |
Since part of developing a robust application involves gracefully handling errors, the sandbox provides a mechanism to simulate AdWords API error responses.
For any request, if you set the email header to login_id++error_code, the response will be the specified error code and a text message indicating the error has been forced by the request. error_code must be one of the AdWords API error codes.
Note: The following numeric ranges use a square bracket to indicate inclusion and a parenthesis to indicate exclusion. For example, [0-20) defines the range of integers including 0 but excluding 20.
In the sandbox, TrafficEstimatorService returns randomly generated stats as follows.
The lower and upper values of the previous properties will be randomly calculated in the [0,100%) and [100%,200%) ranges.
Sandbox report jobs contain random data unrelated to any live accounts.
In the sandbox, you can create a report job with a status that does not change, or a report job that transitions through the statuses.
To create a report job with a fixed status, include one of these case-insensitive strings in the name field:
If the report job name does not contain any of these strings, the report job will transition through statuses:
The getAllJobs request returns an array of four DefinedReportJob objects (one for each of value of ReportJobStatus).
The deleteReport request does nothing.
The following behavior has changed in the sandbox version of KeywordToolService:
getKeywordVariations generates two suggestions per keyword:
suggestion prepended to it
suggestion followed by the keyword words in reverse order.For example, a seed of bath towel would generate keywords suggestion bath towel and suggestion towel bath. If the keyword text has only one word, getKeywordVariations returns one suggestion.
getKeywordsFromSite generates site-based keywords in random numbers of groups of suggestions: range of [1,10] groups with includeLinkedPages false, and a range of [1,20] groups with includeLinkedPages true. The number of keywords is [number_of_groups, number_of_groups*10], distributed randomly in the groups, which generates a list of more than 200 keywords.
Uses the java.lang.String.hashCode() method against the keyword text to generate the values for searchVolumeScale (text.hashCode() % 6) and advertiserCompetitionScale ((text.hashCode() / 13) % 6).