Why aren't ads appearing using code snippets from the sandbox environment?

There are three reasons why this might happen.

You are using the "alternate" parameter in your ad code.
If you specify the alternate parameter in the ad code, this is what will be displayed instead of a public service announcement (PSA) when a PSA would normally displayed. If a color is specified for the alternate parameter, a block of this color will be displayed. If the block color is the same as page background color, this block is there, it just isn't apparent.
Resolution: Remove the "alternate" parameter from your ad code and/or your generateAdCode request or set alternate to a color value that does not match the background of your page.

Your publisher id corresponds to a disabled account
The sandbox and the "real world" are two separate places. The publisher ids the sandbox creates are not valid publisher ids in our production AdSense environment. However, the ad code snippets that the API returns accesses the production AdSense servers. If the publisher id issued by the sandbox is the same as a publisher id that has been disabled in the production AdSense environment, then no ads will be displayed.
Resolution: Create another one or two publisher accounts and try the ad code with these. If this still fails, email support and include the publisher ids you've tried so far.

The ad code can not reach Google servers
Most likely due to network misconfiguration, the JavaScript ad code can not contact Google servers over the internet.
Resolution: Check proxy and other network settings.
Main menu
8960212947680145155
true
Search Help Center
true
true
true
false
false