Hello Anand,

It is not possible to get all the accounts details in a single API call via
Google Ads API beta. Via Google Ads API beta to fetch the list of
accessible account for your credentials. you could use CustomerService
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v0.services#google.ads.googleads.v0.services.CustomerService>
.ListAccessibleCustomers
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v0.services#listaccessiblecustomersrequest>.
Which will return only resource names of the accessible accounts.

The query you have used is to fetch the account hierarchy via GoogleAdsAPI
beta, which will give all the resource names of the accounts under a
manager account when using the CID of the manager account and the OAuth
credentials of the manager while making the API call.

Since, the Get requests are heavier it is expected to take a little more
time, generally it is recommended to use search query while pulling the
details like these via resources. You could use the available customer
fields in the customer
<https://developers.google.com/google-ads/api/docs/fields/customer> resource
and can pass each customer Id to get the respective details of that
customer. Below is the sample search query to fetch the customer details
via customer resource.

Query in DotNet format given below:
Query = @"SELECT
                   customer.resource_name,
                   customer.descriptive_name,
                   customer.id,
                   customer.test_account,
                   customer.tracking_url_template FROM customer",
                   CustomerId = customerId.ToString() //Pass the customer
Id that you found on the resource name earlier.

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

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/00d12i8kmg000001go22oi0003b0u2z6cmj6c1l6oo30c1g68qj2dpl%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • AdsAcco... Anand Sumo
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Anand Sumo
      • ... Anand Sumo
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to