Saturday, April 13, 2013

Digest for - 2 Messages in 1 Topic


    Sean <> Apr 11 06:15PM -0700  

    I'm not sure if I'm missing something with this, but I'm having problems
    generating ads with php and the v4.1 AdSense host.
    I have all the access and refresh tokens up and running correctly, got the
    link set up between the user and all that set up. Now I'm trying to create
    ads for my test user.
    You need to create ads first with the insert statement first, then get them
    with the generateAdCode function correct?
    I copied this out of the example PHP code, doing a print_r it all seems to
    look correct.
    $adUnit = new Google_AdUnit();
    $adUnit->setName('Test 1');
    $contentAdsSettings = new Google_AdUnitContentAdsSettings();
    $backupOption = new Google_AdUnitContentAdsSettingsBackupOption();
    $contentAdsSettings->setSize('SIZE_600_160'); //width then height
    $customStyle = new Google_AdStyle();
    $colors = new Google_AdStyleColors();
    $font = new Google_AdStyleFont();
    This is the insert statement I'm running: ($pubID is the users pubID,
    $clientID is the app client ID for the project) (I think that is correct
    $result = $adsensehostService->accounts_adunits->insert($pubID, $clientID,
    This is the error I'm getting
    *Fatal error*: Uncaught exception 'Google_ServiceException' with message
    'Error calling POST
    (404) Ad client not found.'
    I've been trying to figure out what the Ad client not found means, or if
    I'm even on the right track for making ads.
    Any help would be appreciated.


    "Jose Alcérreca (AdSense API Team)" <> Apr 12 02:00AM -0700  

    Hi Sean
    Ad clients are something else:
    Just list them to get your ad client id. Look for "AFC" as it's most likely
    the product code you will be using.
    Jose Alcérreca
    Developer Relations
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    Registered in England Number: 3977902
    Google Inc.| Developer Relations | *AdSense API Team* |**adsense <>
    On Friday, 12 April 2013 02:15:40 UTC+1, Sean wrote:


You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit


  1. Its like you read my mind! You seem to know so much about this,
    like you wrote the book in it or something. I think
    that you could do with a few pics to drive the message
    home a bit, but instead of that, this is fantastic
    blog. A fantastic read. I will certainly be back.

    Look at my weblog; fake ray bans

  2. Here again you want to find or even create an angle or slant in which you can take headline news and 'incorporate' it into a post you are
    composing. However there are several troubleshooting steps you need to perform in
    order to determine the problem. As a consequence it can be contended the media is
    directing many persons astray moving away from what should
    be its aim of presenting discerning news and analytic thinking of pressing topics for
    this celebrity frippery.

    My blog post latest celeb news