Hi,

I've found the problem:

$AdGroupAdNEW->adGroupId = "5000070837";

We should not use " " around the ID, removing them made the script run
properly. I hope this will help ;)


On Dec 1, 10:09 am, prouted <remindtestlive...@gmail.com> wrote:
> Hi,
>
> I'm new using the Google Adwords API. I managed to create campains and
> adgroups, and list them based on the examples provided with the latest
> AdWords API PHP Client Library.
>
> I have a problem when trying to create an adgroupad. Indeed, I always
> get the message EntityNotFound.INVALID_ID @ operations
> [0].adGroupAd.adGroupId; trigger:'AdGroupId: 2147483647'. The problem
> here is that the adgroupid I use is not 2147483647.
>
> Here is the code I user:
>
> // Get AdWordsUser from credentials in "../auth.ini"
> // relative to the AdWordsUser.php file's directory.
> $user = new AdWordsUser();
>
> // Log SOAP XML request and response.
> $user->LogDefaults();
>
> // Get the AdGroupadsService.
> $adService = $user->GetAdGroupAdService();
>
> $AdGroupAdNEW = new AdGroupAd();
> $AdGroupAdNEW->adGroupId = "5000070837";
> $AdGroupAdNEW->status = 'PAUSED';
>
> $ad = new TextAd();
> $ad->url='http://www.test.com';
> $ad->displayUrl='http://www.test.com';
> $ad->headline='This is my title';
> $ad->description1='This is my desc1.1';
> $ad->description2='This is my desc2.1';
> $AdGroupAdNEW->ad = $ad;
>
> $operations = new AdGroupAdOperation($AdGroupAdNEW,NULL,'ADD');
> $adgroupAdReturnValue = $adService->mutate($operations);
>
> // Display new campaigns.
> foreach ($adgroupAdReturnValue->value as $ad)
> {
>         print 'New ad with name '.$ad->name.' and id '.$ad->id.' was created.
> \n';
>
> }
>
> The adgroup I would like to use is using the ID 5000070837. My
> authentification settings are the same as the ones used when creating
> the campains and adgroup. What do I do wrong here ?
>
> Many thanks in advance for your help !!

--

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-...@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