Hi Eric. Thanks for the reply.

Do you mean  https://adwords-sandbox.google.com ?
I am using WAMP and I tried to access above url using Chrome. it redirects 
me to www.google.com. 


BTW I tried it again with my MCC account and here is the error I got.

 Fatal error: Uncaught SoapFault exception: [soap:Server] 
InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ 
com.google.ads.api.services.common.error.InternalApiError.(InternalApiErro 
in C:\wamp\www\google\src\Google\Api\Ads\Common\Lib\AdsSoapClient.php:201 
Stack trace: #0 
C:\wamp\www\google\src\Google\Api\Ads\Common\Lib\AdsSoapClient.php(201): 
SoapClient->__soapCall('get', Array, NULL, Array, Array) #1 
C:\wamp\www\google\src\Google\Api\Ads\AdWords\v201109\ServicedAccountService.php(1874):
 
AdsSoapClient->__soapCall('get', Array) #2 
C:\wamp\www\google\examples\v201109\AccountManagement\test.php(29): 
ServicedAccountService->get(Object(ServicedAccountSelector)) #3 {main} 
thrown in 
C:\wamp\www\google\src\Google\Api\Ads\Common\Lib\AdsSoapClient.php on line *
201* 


I am testing Ewan Heming's code...

On Monday, March 12, 2012 5:01:29 PM UTC+2, Eric Koleda wrote:
>
> Hi,
>
> Can you ensure that the URL is accessible from your server?  Perhaps there 
> is a firewall in your network preventing the traffic.
>
> Best,
> - Eric
>
> On Tuesday, March 6, 2012 3:44:09 PM UTC-5, hakin wrote:
>>
>> That's not the problem :( I am still getting the same error. Here is the 
>> code.
>>
>> <?php
>>  
>> error_reporting(E_STRICT | E_ALL);
>>
>> // Add the library to the include path. This is not neccessary if you've 
>> already
>> // done so in your php.ini file.
>> $path = dirname(__FILE__) . '/../../../src';
>> set_include_path(get_include_path() . PATH_SEPARATOR . $path);
>>
>> require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php'; 
>>
>>
>> $username = "***@gmail.com";
>> $password = "***";
>> $currencyCode = "TRY";
>> $developerToken = "$username++$currencyCode";
>>  
>> $user = new AdWordsUser(null, $username, $password, $developerToken);
>> $user->SetDefaultServer("https://adwords-sandbox.google.com";);
>> $user->LogAll();
>> $user->SetClientId(null);
>>  
>> try {
>>     $campaignService = $user->GetService("CampaignService", 'v201109');
>>     $page = $campaignService->get(new Selector());
>> } catch (Exception $e) {}
>>  
>> $accountService = $user->GetService("ServicedAccountService", 'v201109');
>> $selector = new ServicedAccountSelector();
>> $page = $accountService->get($selector);
>>  
>> foreach ($page->accounts as $account) {
>>     print "Customer ID: {$account->customerId}\n";
>> }
>>  
>> $accountService = $user->GetService("ServicedAccountService", 'v201109');
>> $selector = new ServicedAccountSelector();
>> $page = $accountService->get($selector);
>>  
>> $customerId = $page->accounts[0]->customerId;
>> $user->SetClientId($customerId);
>>  
>> $campaignService = $user->GetService("CampaignService", 'v201109');
>>  
>> $campaign = new Campaign();
>> $campaign->name = "Test Sandbox Account";
>> $campaign->status = "ACTIVE";
>> $campaign->biddingStrategy = new ManualCPC();
>>  
>> $budget = new Budget();
>> $budget->period = 'DAILY';
>> $budget->amount = new Money((float) 10000000);
>> $budget->deliveryMethod = 'STANDARD';
>> $campaign->budget = $budget;
>>  
>> $networkSetting = new NetworkSetting();
>> $networkSetting->targetGoogleSearch = TRUE;
>> $campaign->networkSetting = $networkSetting;
>>  
>> $operation = new CampaignOperation();
>> $operation->operand = $campaign;
>> $operation->operator = 'ADD';
>>  
>> $operations = array($operation);
>> $result = $campaignService->mutate($operations);
>>  
>> print_r($result);
>> ?>
>>
>> On Tuesday, March 6, 2012 5:34:13 AM UTC+2, Ewan Heming wrote:
>>>
>>> You've got the AdWords API server set as 
>>> http://adwords-sandbox.google.com/<http://adwords-sandbox.google.com//api/adwords/mcm/v201109/ServicedAccountService?wsdl>,
>>>  
>>> but it should use https; try changing it to 
>>> https://adwords-sandbox.google.com/<http://adwords-sandbox.google.com//api/adwords/mcm/v201109/ServicedAccountService?wsdl>
>>>  and 
>>> see if that works....
>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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