I need example code about link exist account to mcc

49 views
Skip to first unread message

minh quan le

unread,
May 24, 2018, 3:08:06 AM5/24/18
to AdWords API and Google Ads API Forum
like a title I want to link a client account to my mcc account, and unlink account (in java)
Any one have example code ?


Luis Xander Talag (AdWords API Team)

unread,
May 24, 2018, 5:00:38 AM5/24/18
to AdWords API and Google Ads API Forum
Hi Minh,

You may use the ManagedCustomerService.mutateLink() method to link or unlink an account. For reference and sample codes, you may check this guide. Let me know if you have clarifications.

Thanks and regards,
Luis
AdWords API Team

minh quan le

unread,
May 24, 2018, 6:41:27 AM5/24/18
to AdWords API and Google Ads API Forum


Vào 16:00:38 UTC+7 Thứ Năm, ngày 24 tháng 5 năm 2018, Luis Xander Talag (AdWords API Team) đã viết:
unlink a client Account that I has create then I recive Error CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER.
and to Link  what actions should  I use? ADD + PENDING or SET + ACTIVE

Luis Xander Talag (AdWords API Team)

unread,
May 24, 2018, 11:21:03 PM5/24/18
to AdWords API and Google Ads API Forum
Hi Minh,

The ManagedCustomerServiceError.CANNOT_UNLINK_ACCOUNT_WITHOUT_ACTIVE_USER error you encountered means that the account you are trying to unlink doesn't have a user with administrative access or a manager account with administrative ownership. Every account must have either one of those and you cannot unlink them if they don't have.

With regards to linking the accounts, you should use the ADD operator + PENDING link status. Then, you'll have to use the SET operator + ACTIVE link status to accept the invitation. Also, make sure to do this request on the manager account level.

Feel free to write back for any clarifications.

Regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages