Force ads to display

59 views
Skip to first unread message

Darian Shimy

unread,
Dec 4, 2012, 8:45:52 PM12/4/12
to adsen...@googlegroups.com
In our sandbox accounts (for the Host API), is there a way to force ads to display on the publisher's sites?  This would be very useful for testing.  Thanks.

Group Participant

unread,
Dec 4, 2012, 9:06:55 PM12/4/12
to adsen...@googlegroups.com
This is what I was told via email:

If you just need to run some quick tests, you can use the same developer credentials you already have, but authenticate with your real, live account. That should give you access to all the functionality, on your live account.

How to use the live account for authentication only and then use the sandbox account for API calls I've yet to figure out.

2012年12月5日水曜日 10時45分52秒 UTC+9 Darian Shimy:

Darian Shimy

unread,
Dec 4, 2012, 9:10:54 PM12/4/12
to adsen...@googlegroups.com
Thanks for the response.  That is what I was told as well, (and I am doing that), but I'm trying to get the ads to display.  I see the Javascript on the page, but no ads yet.  Is there a way to force placeholder ads to display?

Group Participant

unread,
Dec 4, 2012, 9:21:53 PM12/4/12
to adsen...@googlegroups.com
I'd assume no.  The sandbox doesn't display ads at all, of any type, dummy placeholders or otherwise.  You'd have to somehow mock out the JS in the generated ad tag to add your own logic for showing a placeholder.

While I'm at it here, could you share in a nutshell how you're doing the live account authentication/sandbox account API calls?

2012年12月5日水曜日 11時10分54秒 UTC+9 Darian Shimy:

Darian Shimy

unread,
Dec 5, 2012, 12:24:30 PM12/5/12
to adsen...@googlegroups.com

While I'm at it here, could you share in a nutshell how you're doing the live account authentication/sandbox account API calls?

For the API calls we are using the PHP library http://code.google.com/p/google-api-php-client/

The examples for the Adsense Host API seemed out of date with the version we were using so I followed this link for the authorization:


After that we just added the start association.

Group Participant

unread,
Dec 5, 2012, 9:48:56 PM12/5/12
to adsen...@googlegroups.com
Wait a second; if you aren't seeing banners that means you aren't being authenticated with your live account.  I was told that authenticating using your live account is the way to display banners using the sandbox account.

2012年12月6日木曜日 2時24分30秒 UTC+9 Darian Shimy:

Sérgio Gomes (AdSense API Team)

unread,
Dec 6, 2012, 8:59:37 AM12/6/12
to adsen...@googlegroups.com
Hi!

I just wanted to jump in and say that by authenticating with your live account you're not displaying banners with the sandbox account; in fact you're fully using your live account and any ads that get shown on it will be counted towards your stats there. Any modifications you make will also affect your live account.

I would therefore advise caution in testing things out this way; it's a good idea to stick to read-only calls, for example.

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902
Reply all
Reply to author
Forward
0 new messages