Hi,
I try to get the API Unit information but I have some problem. 
I use PHP library, this is a part of my code:

$email = "my_mcc_email";        
$password = "xxxxxxxxxxxxxxxxxxxxx";
$userAgent = "SOMETHING";
$applicationToken = "";  
$developerToken = "my_mcc_email++USD";
$user = new AdWordsUser(NULL, $email, $password, $developerToken, 
$applicationToken, $userAgent);
$user->SetDefaultServer("https://adwords.google.com/";);

#and I change the server when I use the sandbox:
$user->SetDefaultServer("https://adwords-sandbox.google.com/";);

That code doesn't produce any error (both).

When I call the InfoService I have some problem:

$infoService = $user->GetService('InfoService', 'v201109');
$clientEmail = 'AN-EMAIL-FROM-CLIENTS-LIST';
        
$selector = new InfoSelector();
$selector->clientEmails = array($clientEmail);
$selector->includeSubAccounts = TRUE;
$selector->apiUsageType = 'TOTAL_USAGE_API_UNITS_PER_MONTH';
date_default_timezone_set('UTC');
$start_date = "2012-03-01";
$end_date = "2012-03-31";
$selector->dateRange = new DateRange(date('Ymd'), date('Ymd')); 
$out = $infoService->get($selector);
var_dump($out);

So: when I use SANDBOX I get no error, but when I switch to the production 
server I get this error:

PHP Fatal error:  Uncaught SoapFault exception: [soap:Server] 
[QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'my_mcc_email++USD'; 
errorDetails:message=Unable to locate billing information for that 
Developer Token.] in 
/aw_api_php_lib_3.0.0/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php:201

Can somebody help me to know what's my mistake?
Thanks

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to