Remove managed customer account

535 views
Skip to first unread message

Po-Yu Hsieh

unread,
Jul 26, 2021, 4:07:02 AM7/26/21
to AdWords API and Google Ads API Forum
Hi,

  I'm trying to manage sub-accounts with Ruby API in order to create sub-accounts under single management account, and further run campaigns with them. Now I'm having need to remove unused sub-accounts but getting some troubles.

  Generally with Ruby's API, you can remove specified resource in this way (removing campaign, for instance):

operation = ads_client.operation.remove_resource.campaign(campaign_path)
response = client.service.campaign.mutate_campaigns(customer_id: sub_account_id, operations: [operation])


  However, when I'm trying to do the same operation (removing managed customer) for sub-account (client resource), I got this error:

operation = ads_client.operation.remove_resource.customer(cusotmer_path)
response = client.service.customer.mutate_customers(customer_id: sub_account_id, operations: [operation])

>> ArgumentError: Unknown field: remove

  Any workable way to remove a managed sub-account, or it's just impossible to remove sub-accounts in programmed way?


Po-Yu Hsieh

unread,
Jul 26, 2021, 4:10:03 AM7/26/21
to AdWords API and Google Ads API Forum
Typo:

> for sub-account (client resource)
=> for sub-account (customer resource)

Po-Yu Hsieh 在 2021年7月26日 星期一下午4:07:02 [UTC+8] 的信中寫道:

Google Ads API Forum Advisor

unread,
Jul 27, 2021, 1:50:03 AM7/27/21
to pyk...@gmail.com, adwor...@googlegroups.com

Hi Po-Yu Hsieh,

Thanks for reaching out to us.

Unfortunately, there is no other way to remove the accounts completely through Google Ads API. However, you can unlink from the current manager account or give access to a user as an administrative user to that account and then do the un-linking. To unlink using the Google Ads API, here's the documentation references below:

Regards,

Google Logo
Yasar Ramjan Makandar
Google Ads API Team
 


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