Friday, August 30, 2013

Digest for - 2 Messages in 2 Topics


    Stats VNG <> Aug 30 12:37AM -0700  

    Hi all,
    require_once dirname(__FILE__).'/google-api-php-client/Google_Client.php';
    require_once dirname(__FILE__).'/google-api-php-client/contrib/Google_AdSenseService.php';
    require_once dirname(__FILE__).'/google-api-php-client/contrib/Google_Oauth2Service.php';
    $SERVICE_ACCOUNT_PKCS12_FILE_PATH = dirname(__FILE__).'/keyfile.p12';
    // create client object and set app name
    $client = new Google_Client();
    $client->setApplicationName("XXXX"); // name of your app
    // set assertion credentials
    $key = file_get_contents($SERVICE_ACCOUNT_PKCS12_FILE_PATH);
    $auth = new Google_AssertionCredentials(
    "", // email you added to GA
    $accessToken = $client->getAccessToken();
    // other settings
    $client->setClientId(""); // from API console
    $service = new Google_AdsenseService($client);
    $optParams = array('metric' => array('earnings'), 'dimension' => 'date');
    $data = $service -> reports -> generate('2013-01-01', '2013-03-03', $optParams);
    But I got the error messege : (403) User does not have an AdSense account
    Please help me!!


    Eduardo Scoz <> Aug 29 12:55PM -0700  

    Hi Sergio, thanks for the great news!
    I'm testing the alerts functionality, is there any way to generate "test"
    alerts, so we can develop against it? The accounts I have access to do not
    currently have any alerts.
    Also, what's the distinction between alerts and the "messages" inbox that
    exist in AdSense today? Seems like messages are not available thru the API
    is that correct?
    Thank you,
    Eduardo Scoz
    QuickAdsense developer
    On Tuesday, June 18, 2013 6:10:23 AM UTC-7, Sérgio Gomes (AdSense API Team)


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 comment:

  1. If you are looking into earning money from your visitors by popup ads - you can try one of the most reputable companies: Clicksor.