Hi,

I'm trying to create ads using the PHP API. The problem I'm having is the 
following:

I'm using this example code found on GitHub 
<https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/GetAdGroups.php>
 to 
retrieve my AdGroups. This seems to work fine and returns the 2 AdGroups I 
have, (I omitted the last 3 chars of the IDs):

Ad group with ID -1627709*** and name 'AdGroup 2018-10-08 09:59:11' was found.
> Ad group with ID -1780708*** and name 'AdGroup 2018-10-09 08:56:30' was found.
> Number of results found: 2
>
>
 However, when I try to create a ad with one of the ID's mentioned above using 
this example found on GitHub 
<https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/AddExpandedTextAds.php>,
 the 
code always crashes with this error:

*Fatal error*: Uncaught Google\AdsApi\AdWords\v201809\cm\ApiException: 
> [EntityNotFound.INVALID_ID @ operations[0].operand.adGroupId; 
> trigger:'TempAdGroupId: 1780708912'] in 


After some tinkering around, I found that when you open your AdWords 
dashboard and navigate to your AdGroups the following is found in the URL:

&adGroupId=66938767***


When I add that ID to my code instead of the one that is returned by the 
GetAdGroups method, the ad is generated just fine.  

I'm at a loss here; am I doing something wrong or is the example wrong? 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e8ad1981-ef88-4b45-b4a7-8465a53c7c27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to