I have the same problem,
I can get a list of campaigns, but cannot get a list of ads...
below my code:
getAllCampaings() => working
getAllAds() => SOAP Error:
[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ ]
public function getAllCampaigns()
{
require_once 'frame/adwords/src/Google/Api/Ads/AdWords/Lib/
AdWordsUser.php';
$user = new AdWordsUser();
$campaignService = $user->GetCampaignService('v201003');
$selector = new CampaignSelector();
$page = $campaignService->get($selector);
// Display campaigns.
if (isset($page->entries))
{
foreach ($page->entries as $campaign)
{
print_r($campaign);
}
}
else
{
print "No campaigns were found.\n";
}
}
public function getAllAds()
{
require_once 'frame/adwords/src/Google/Api/Ads/AdWords/Lib/
AdWordsUser.php';
$user = new AdWordsUser();
$adGroupAdService = $user->GetAdGroupAdService('v201003');
$adGroupId = (float) '3000364978';
$selector = new AdGroupAdSelector();
$selector->adGroupIds = array($adGroupId);
$selector->statuses = array('ENABLED', 'PAUSED', 'DISABLED');
$page = $adGroupAdService->get($selector);
// Display ads.
if (isset($page->entries))
{
foreach ($page->entries as $ad)
{
print_r($ad);
}
}
else
{
print "No ads were found.\n";
}
}
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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