Hi Teja,

I'm using a refreshtoken of a Google account that has access to multiple 
Google Ads accounts.
So first I need to get the available customers for that Google account. And 
then for each account I need to query for sub-accounts.
If that account is a manager account I can retrieve the sub-accounts from 
customer_client or customer_client_link.

When I use the query you provided the first two requested properties 
'customer.id' and 'customer.descriptive_name' are always the same; the id 
and name of the manager account itself.
So I still need to query every subaccount id for the descriptive_name. And 
if that subaccount is also a manager account I need to do the same for his 
subaccounts etc.

Marc

Op woensdag 9 januari 2019 21:24:50 UTC+1 schreef Teja Makani:
>
> Hello Marc,
>
> It is expected to result out the details of single account when the CID 
> passed in the program is of non manager account. Just like AdWords API,  
> you could sent the Manager's client customer Id to to get the entire 
> hierarchy. Please give it a try and please elaborate the scenario trying if 
> the problem persists. You could also try the below CURL command from the 
> terminal for the same.
>
> curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN"      -H 
> "developer-token: DEVELOPER_TOKEN"      -H "Content-Type: 
> application/json"      
> https://googleads.googleapis.com/v0/customers/YOUR_MCC_ID/googleAds:search  
>     --data '{query: "SELECT customer.id, customer.descriptive_name, 
> customer_client.resource_name, customer_client.client_customer, 
> customer_client.level, customer_client.hidden FROM customer_client"}'
>
> Regards,
> Sai Teja, AdWords API Team
>
>
> On Thursday, January 3, 2019 at 6:34:16 AM UTC-5, Marc Selman wrote:
>>
>> I'm trying to retrieve a complete nested tree of all customers (and if 
>> it's a manager account, the customers below that etc.)
>> To do this I'm using the new Google Ads API (v0.7) to retrieve the 
>> CustomerClientLinks recursively and for every link I'm using GetCustomer to 
>> retrieve the customer information such as the DescriptiveName.
>> But for a simple tree with two levels and a total of 37 customers this 
>> takes around a minute.
>>
>> The API methods seem rather slow. Is that normal?
>>
>> Also, I need to retrieve the links and the customerdata for every found 
>> customerId to check if they have subaccounts and to get the name.
>> Because of this I need to perform a lot of calls which could (with a 
>> large tree) easily hit the rate limit.
>> It would be better if I could retrieve all the available customers 
>> (paged) in one call instead of having to recursively find them.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7202c8de-0091-413d-9edf-b514f969526d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Retriev... Marc Selman
    • Re... 'Teja Makani' via AdWords API and Google Ads API Forum
    • Re... 'Teja Makani' via AdWords API and Google Ads API Forum
      • ... Marc Selman
    • Re... 'Teja Makani' via AdWords API and Google Ads API Forum
      • ... Marc Selman
    • Re... 'Teja Makani' via AdWords API and Google Ads API Forum
      • ... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to