Hi, in the new google ads API (v1) I am successfully fetching the account 
trees associated with a refresh token in the following way:

1) Get the customer resource names of the root accounts using the 
CustomerService's 
ListAccessibleCustomers method. 
<https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v1.services#google.ads.googleads.v1.services.CustomerService.ListAccessibleCustomers>
2) Recursively query the customer_client_link view to get all the children 
resource names with the following query

SELECT
customer_client_link.status
customer_client_link.client_customer
FROM
customer_client_link
WHERE
customer_client_link.status = 'ACTIVE'

It works fine but I also get cancelled accounts back. How can those be 
ignored? I tried with the customer_client_link.hidden = FALSE filter too 
but that didn't work (as it shouldn't since that's a different property), 
however there isn't a related customer state property to filter on.

In comparison, the adwords api's ManagedCustomerService 
<https://developers.google.com/adwords/api/docs/reference/v201809/ManagedCustomerService>
 
get method ignores cancelled accounts by default.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7dbdf6f0-c64b-49d3-86b2-0f5593a29620%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • How to ... Alex Mmz
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum
      • ... Alex Mmz
        • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to