Hi,

You are sending your sandbox developer token to the production environment. 
When making calls to the production environment, you need to substitute the 
sandbox developer token with your approved developer token in auth.ini.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Tuesday, 27 March 2012 16:22:56 UTC+5:30, Charles Best wrote:
>
> 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to