Anyway to get all Google Ads accounts associated with a google account after OAuth login?

16 views
Skip to first unread message

Dipack Panjabi

unread,
Mar 30, 2020, 8:59:39 PM3/30/20
to AdWords API and Google Ads API Forum
As the question says, is there a way to figure out what Google Ads accounts are associated with a particular google account after OAuth login? By way of an API, perhaps?

Google Ads API Forum Advisor Prod

unread,
Mar 31, 2020, 2:28:35 PM3/31/20
to dip...@transcend.io, adwor...@googlegroups.com

Hi Dipack,

Thank you for reaching out. You could use the ManagedCustomerService.get() to retrieve the account hierarchy information under a particular Google Ads account. This is a code example for you on how to use this service. Please let us know if you have any further questions.

Thanks and regards,
Xiaoming, Google Ads API Team


 

ref:_00D1U1174p._5001UZVIPp:ref

Dipack Panjabi

unread,
Mar 31, 2020, 2:31:11 PM3/31/20
to AdWords API and Google Ads API Forum
Thanks for the response, Xiaoming.

In order to make the request, I would have to provide a `clientCustomerId` header in the request, and I can pull the account hierarchy only then, right?

I was hoping there was a way for me to not provide a `clientCustomerId` header, and simply retrieve all managed accounts that way. Can you do something like that?

Dipack

Google Ads API Forum Advisor Prod

unread,
Apr 1, 2020, 12:14:11 PM4/1/20
to dip...@transcend.io, adwor...@googlegroups.com

Hi Dipack,

Thank you for reaching out. You need to provide the clientCustomerId information in the header to make API calls against this account. If you do not provide the clientCustomerId in the API call, you will not be able to retrieve data from this account and the API call would fail. This is a necessary step. Please let me know if you have any further questions.



Thanks and regards,
Xiaoming, Google Ads API Team


 

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