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 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
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?