Could you help me to undestand why $adGroupAdService->get always return empty?

32 views
Skip to first unread message

Pavel Ustyugov

unread,
Oct 10, 2020, 11:51:46 AM10/10/20
to AdWords API and Google Ads API Forum
My application use a base developer token. 
It gets clients list, campaigns, adGroups - it is ok!
but when I want go get ads  using AdGroup Id  it always returns an empry result.

screen.jpg

Google Ads API Forum Advisor Prod

unread,
Oct 11, 2020, 9:28:28 PM10/11/20
to atre...@gmail.com, adwor...@googlegroups.com
Hi Pavel,

Thanks for posting your concern.

To further investigate, could you provide the complete SOAP request and response logs generated on your end together with the customer ID? You can provide it via Reply privately to author option.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q268KEB:ref

Павел Устюгов

unread,
Oct 12, 2020, 4:09:32 AM10/12/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Sure, here it is. 

Unfortunately I don't use SOAP and couldn't work with it. I develop with php library.
I will try to show the request and response and entire cod of the program in attachment.

clientCustomerId = "275-363-3549"
AD_GROUP_ID = '102249169889';

The request:

Google\AdsApi\AdWords\v201809\cm\Selector::__set_state(array(
   'fields' =>
  array (
    0 => 'Id',
    1 => 'Status',
    2 => 'HeadlinePart1',
    3 => 'HeadlinePart2',
    4 => 'Description',
  ),
   'predicates' =>
  array (
    0 =>
    Google\AdsApi\AdWords\v201809\cm\Predicate::__set_state(array(
       'field' => 'AdGroupId',
       'operator' => 'IN',
       'values' =>
      array (
        0 => 102249169889,
      ),
    )),
    1 =>
    Google\AdsApi\AdWords\v201809\cm\Predicate::__set_state(array(
       'field' => 'AdType',
       'operator' => 'IN',
       'values' =>
      array (
        0 => 'EXPANDED_TEXT_AD',
      ),
    )),
    2 =>
    Google\AdsApi\AdWords\v201809\cm\Predicate::__set_state(array(
       'field' => 'Status',
       'operator' => 'IN',
       'values' =>
      array (
        0 => 'ENABLED',
        1 => 'PAUSED',
      ),
    )),
  ),
   'dateRange' => NULL,
   'ordering' =>
  array (
    0 =>
    Google\AdsApi\AdWords\v201809\cm\OrderBy::__set_state(array(
       'field' => 'Id',
       'sortOrder' => 'ASCENDING',
    )),
  ),
   'paging' =>
  Google\AdsApi\AdWords\v201809\cm\Paging::__set_state(array(
     'startIndex' => 0,
     'numberResults' => 500,
  )),
))


the Response:

Google\AdsApi\AdWords\v201809\cm\AdGroupAdPage::__set_state(array(
   'entries' => NULL,
   'totalNumEntries' => 0,
   'PageType' => 'AdGroupAdPage',
   'parameterMap' =>
  array (
    'Page.Type' => 'PageType',
  ),
))



Could you help me how to undestand the reason why the response has NULL entries.


пн, 12 окт. 2020 г. в 04:28, Google Ads API Forum Advisor Prod <adsapifor...@gmail.com>:
GetExpandedTextAds.php

Google Ads API Forum Advisor Prod

unread,
Oct 12, 2020, 10:42:10 AM10/12/20
to atre...@gmail.com, adwor...@googlegroups.com
Hello,

The reason you are seeing empty results is because the account 275-363-3549 is a manager account. You will need to make the API call from the client account where the ad group is located.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q268KEB:ref

Павел Устюгов

unread,
Oct 12, 2020, 12:35:27 PM10/12/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thank you for the clarification. 

Thanks So much Anthony! You saved my application! 

Best Regards Paul Ustyugov


пн, 12 окт. 2020 г. в 17:41, Google Ads API Forum Advisor Prod <adsapifor...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages