Ads api v1 - login-customer-id with MCC above client

267 views
Skip to first unread message

Bas van Steen

unread,
May 21, 2019, 11:41:10 PM5/21/19
to AdWords API and Google Ads API Forum
At the moment I'am rebuilding a web app from using Adwords API 201809 to the new ads api V1.
In the new API it isn't possible to authenticate with a client id if there is a MCC (manager account) above that customer. (login-customer-id)
If that is the case you need the client id of the mcc account.

But I have no idea if there is a MCC above the client. Is there a solution I can figure out if there is one, and if there is a MCC above, that I can get that client id.

Google Ads API Forum Advisor Prod

unread,
May 22, 2019, 3:47:53 AM5/22/19
to adwor...@googlegroups.com

Hi,

Thank you for reaching out. You would need to set the login-customer-id if your access to the customer account is through a manager account. This header is required and must be set to the customer ID of the manager account. To check if the client is under a MCC, in Google Ads UI, you need to go to Tools > Account Access(Under setup) > Manager tab. However, if you are using a root MCC, it shouldn't be under any manager.

Let me know if this helps.

Regards,
Dave
Google Ads API Team



ref:_00D1U1174p._5001UAqJ0s:ref

Bas van Steen

unread,
May 22, 2019, 3:57:57 AM5/22/19
to AdWords API and Google Ads API Forum
Hi,

I understand that part, but the question is how can I see that when I am using the API.
Our customers are already connected via the Oauth connection. In the old API I can make a request without knowing if the account is under MCC.
But in the new one I have to know. My question is how can I deal with it using the API. (I need to know if it is under MCC and if yes, what the client id of the MCC is)


Op woensdag 22 mei 2019 09:47:53 UTC+2 schreef adsapiforumadvisor:

Oliver

unread,
May 22, 2019, 7:17:46 AM5/22/19
to AdWords API and Google Ads API Forum
Wow.. if what Bas is saying is true, this is a major showstopper!  There might be no way of finding out info about the parent MCC because the authenticated user might not have permission.  Even if he has permission, why does the new API work like this?    It's a perfectly common scenario for tools to want to access the data of one account without needing to be aware of who its parent is.  The old API allows this and rightly it should.  Please consider fixing major limitations like this as this is enough to cause many apps to stop working completely.

Oliver   

Google Ads API Forum Advisor Prod

unread,
May 23, 2019, 2:07:50 AM5/23/19
to adwor...@googlegroups.com
Hi Everyone,

The old API and the new API are merely the same with regards to this. The difference in the new API is you would need to set the login-customer-id to access a client account from your manager account. If you generated your OAuth credentials using your root MCC, all client accounts under the root MCC should be accessible in the API.

Bas van Steen

unread,
May 23, 2019, 2:47:09 AM5/23/19
to AdWords API and Google Ads API Forum
Hi Dave,


I understand that. My question is how I can get the client id of the mcc account. I only have the client id of the account I need connection with. The OAuth connection is sometimes made with a mcc account. They filled in the client id of another account which is under the mcc. I don’t have the client id of that mcc. How do I get it?



Op donderdag 23 mei 2019 08:07:50 UTC+2 schreef adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
May 23, 2019, 8:14:47 AM5/23/19
to b...@malvee.com, adwor...@googlegroups.com
Hello,

You should be able to fetch the manager account's resource name of an account's parent account by fetching a CustomerManagerLink.

For example:

SELECT customer_manager_link.manager_customer FROM customer_manager_link WHERE customer_manager_link.status = ACTIVE

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5001UAqJ0s:ref

Bas van Steen

unread,
May 23, 2019, 10:13:29 AM5/23/19
to AdWords API and Google Ads API Forum
Hi Mike,

Thank you for the respons.
I'am using the Python library, but it looks like there is no service to get the active customer - manager links.
Is that correct?

With kind regards,
Bas van Steen


Op donderdag 23 mei 2019 14:14:47 UTC+2 schreef adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
May 23, 2019, 10:21:16 AM5/23/19
to b...@malvee.com, adwor...@googlegroups.com
Hello,

Use the GoogleAdsService to run the following query:


SELECT customer_manager_link.manager_customer FROM customer_manager_link WHERE customer_manager_link.status = ACTIVE

This will return the resource name of all active manager links from your current logged in customer. This can be done from any of the client libraries, including Python.

Bas van Steen

unread,
May 24, 2019, 5:11:03 AM5/24/19
to AdWords API and Google Ads API Forum
Hi Mike,

Thank you for the respons. But it seems that I also need a MCC client id for this call...

Bas


Op donderdag 23 mei 2019 16:21:16 UTC+2 schreef adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
May 24, 2019, 7:34:40 AM5/24/19
to b...@malvee.com, adwor...@googlegroups.com
Hello,

I actually tested this exact query on my own account before providing it to you, and it definitely does not require any knowledge of the manager ID in order to work. Can you share exactly what you're doing and what error you're seeing?
Reply all
Reply to author
Forward
0 new messages