How can I get the status of google-ads account (canceled or active)?

100 views
Skip to first unread message

蓝瀚

unread,
Sep 18, 2019, 6:36:32 AM9/18/19
to AdWords API and Google Ads API Forum
I'm tring to get all google-ads account under my google user, and I want to get the status field which would show if the account is canceled.

I'm followed customer_client, and tried with below codes:

 

credentials = google.oauth2.credentials.Credentials(**credentials_dict_lb)
client = google.ads.google_ads.client.GoogleAdsClient(credentials, GG_DEVELOP_TOKEN)

ga_service = client.get_service('GoogleAdsService', version='v2')

query = ('SELECT customer_client.id, '
'customer_client.descriptive_name,'
'customer_client.resource_name, '
# 'customer_client.client_customer '
'customer_client.currency_code,'
'customer_client.hidden, '
#
'customer_client.level, '
'customer_client.time_zone '
'FROM customer_client')

# results1 = customer_service.search(query)
results = ga_service.search(customer_id='1871151278',query=query)

for item in results:
print(item)

But it seems there's no status related field, What field it should be ? And How Can I get the account status as I metioned above?

Google Ads API Forum Advisor Prod

unread,
Sep 18, 2019, 2:45:32 PM9/18/19
to bluevisi...@bluefocus.com, adwor...@googlegroups.com
Hello,

You can use the customer_manager_link.status to get the status of an account.

Cheers,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UHHArP:ref
Message has been deleted

蓝瀚

unread,
Sep 18, 2019, 11:06:41 PM9/18/19
to AdWords API and Google Ads API Forum
Hi Anthony, 

Thanks for replying, It seems that I can only get one account's status each time, I mean how can I get the status and other info (name, id, currency, etc) of all google-ads accounts under my mcc at the same time?

adsapiforumadvisor於 2019年9月19日星期四 UTC+8上午2時45分32秒寫道:

蓝瀚

unread,
Sep 18, 2019, 11:30:43 PM9/18/19
to AdWords API and Google Ads API Forum
Besides, the  customer_manager_link.status it self seems to be the status that mean relationship between mcc and account, it isn't the canceled or active status (red or green sign at google ads manage back system)

So how can I get the status as expected?



adsapiforumadvisor於 2019年9月19日星期四 UTC+8上午2時45分32秒寫道:

Google Ads API Forum Advisor Prod

unread,
Sep 19, 2019, 3:02:06 PM9/19/19
to bluevisi...@bluefocus.com, adwor...@googlegroups.com
Hello,

Unfortunately, this field isn't available in the API currently. You can follow our blog for any updates.

Regards,

learn protect

unread,
Oct 22, 2020, 1:04:32 AM10/22/20
to AdWords API and Google Ads API Forum
Hello,

I am using the latest version of the php v5 client libraries.Has the customer status field been updated?
I did not find this field in the document.

Many thanks

Google Ads API Forum Advisor Prod

unread,
Oct 22, 2020, 1:30:16 PM10/22/20
to learnp...@gmail.com, adwor...@googlegroups.com
Hello,

This feature is still not available in the API.


Regards,
Anthony
Google Ads API Team

Google Logo
Anthony Madrigal
Google Ads API Team
 


ref:_00D1U1174p._5001UHHArP:ref
Reply all
Reply to author
Forward
0 new messages