no response in using adgroupAdService

18 views
Skip to first unread message

ejay.o...@momentummedia.com.au

unread,
Jan 30, 2018, 9:34:28 PM1/30/18
to AdWords API Forum
Hi Adwords Team,

May I ask for help regarding this matter?

I get no response in these codes, particulary the last line:

use Google\AdsApi\AdWords\AdWordsServices;
use Google\AdsApi\AdWords\AdWordsSession;
use Google\AdsApi\AdWords\AdWordsSessionBuilder;
use Google\AdsApi\AdWords\v201708\cm\Ad;
use Google\AdsApi\AdWords\v201708\cm\AdGroupAd;
use Google\AdsApi\AdWords\v201708\cm\AdGroupAdOperation;
use Google\AdsApi\AdWords\v201708\cm\AdGroupAdService;
use Google\AdsApi\AdWords\v201708\cm\AdGroupAdStatus;
use Google\AdsApi\AdWords\v201708\cm\Operator;
use Google\AdsApi\Common\OAuth2TokenBuilder;

$oAuth2Credential = (new OAuth2TokenBuilder())
        ->fromFile('adsapi_php.ini')
        ->build();

$session = (new AdWordsSessionBuilder())
        ->fromFile('adsapi_php.ini')
        ->withOAuth2Credential($oAuth2Credential)
        ->build();

$adWordsServices = new AdWordsServices();

    $adGroupAdService = $adWordsServices->get($session, AdGroupAdService::class);

----------

im getting error 500 on this, 

Thanks,

Peter Oliquino

unread,
Jan 31, 2018, 1:35:50 AM1/31/18
to AdWords API Forum
Hi,

Could you confirm if this is the complete code that you are using when retrieving your AdGroupAds? If yes, then it appears that you have not specified any fields in your Selector. I would recommend that you refer to the GetExpandedTextAds PHP sample code (you may then include the specific AdType you wish to retrieve) and retry your request and see if you are still unable to retrieve any of your ads.

Should the issue persist, you may send to me the generated SOAP request and response via the Reply privately to author option so I can further investigate.

Best regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages