Query to get a specific account id

23 views
Skip to first unread message

Luiz Eduardo Da Cruz

unread,
Dec 15, 2022, 6:54:30 PM12/15/22
to Google Ads API and AdWords API Forum
Hello I would like to know how can I make a query that validates if a specific account id exists in the platform, the account id can be a mcc manager as well as a simple mcc, (it could be any type of mcc)...

Google Ads API Forum Advisor

unread,
Dec 16, 2022, 12:55:18 AM12/16/22
to adwor...@googlegroups.com
Hi Luiz,

Thank you for reaching us out. I am Sherwin from Google Ads API support team. I hope that you are doing well today.

If you are looking to list down all the accounts, you may use this code example in this guide for listing accessible accounts. The resulting list of customers is based on your OAuth credentials. The request returns a list of all accounts that you are able to act upon directly given your current credentials. This will not necessarily include all accounts within the account hierarchy; rather, it will only include accounts where your authenticated user has been added with admin or other rights in the account.

You may also try to use the customer_client report as it will also determine if the account id is the manager account or not.

Let us know if this is what you are looking for.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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