Hello Benjamin,

You could get the resource names of all the accounts under the hierarchy by
using the customer_client
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.resources#customerclient> resource.
You could use the below query to fetch the accounts.

Query: 'SELECT customer_client.resource_name,
customer_client.client_customer, customer_client.level,
customer_client.hidden FROM customer_client';

Please give it a try and let me know if you have any further questions.

Regards,
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 04/18/19 02:45:50 benja...@effilab-local.com wrote:

Hi Dannison,

I have ten of thousands of accounts in my MCC, loading them all feels
completely off.
Is there a way to filter/query like it used to be?

Thanks,

Benjamin



On Monday, April 15, 2019 at 5:49:06 AM UTC+2, googleadsapi-forumadvisor
wrote:

Hi Benjamin,

Thank you for reaching out. The AdWords API Account Hierarchy code sample
uses the ManagedCustomerService.get() operation which returns all the
accounts that are managed by the manager account. In the Google Ads API
perspective, this would be GetCustomerClientRequest
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.GetCustomerClientRequest>
 which will return the accounts under a manager account. If you're looking
to get the accounts list of accounts that are directly accessible via your
OAuth credentials, you can use the CustomerService.ListAccessibleCustomers
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v0.services#google.ads.googleads.v0.services.CustomerService>
 request. This will return all the accounts directly accessible by the user
authenticating the call.

Let me know if you have further clarifications.

Regards,
Dannison
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a
short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey
<https://support.google.com/google-ads/contact/survey_transactional?caseid=0-9670000025618&hl=en&ctx=1>

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
On 04/13/19 04:04:11 benj...@effilab-local.com wrote:

Using the adwors library, I took advantage of the ManagedCustomerService
 (https://developers.google.com/adwords/api/docs/reference/v201809/
ManagedCustomerService) to search the accounts linked to a MCC.

I used to query based on names etc.

How could I achieve the same outcome using google ads please?

Thanks in advance

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/
msgid/adwords-api/8a6a101e-425c-46b4-92fd-6ef3335c3ab2%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/8a6a101e-425c-46b4-92fd-6ef3335c3ab2%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/bea7edc6-cdf6-412d-90a4-6a48497315f0%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/bea7edc6-cdf6-412d-90a4-6a48497315f0%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1a0o73g0000000018c849s0039gha4z60mjidhn60o30c1g68qjcc9o%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • searchi... benjamin
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... benjamin
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
          • ... benjamin
            • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
              • ... benjamin
                • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
                • ... vadim
                • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to