Hello Aryeh,

We'd already tried the account hierarchy script before sending the message 
here and it was giving us errors on many customer IDs. After further 
investigation, we saw that the errors are only happening on hidden and 
cancelled accounts. So, with simple try/except statements we should be able 
to avoid these errors and to retrieve the customer IDs of our active 
accounts.

Thank you for your help.

Kind regards,
Hadil Charafeddine

On Wednesday, December 1, 2021 at 11:33:27 AM UTC-5 adsapi wrote:

> Hi Hadil,
>
> Thank you for sending us your sample code and your description of what you 
> are looking for. Listing accessible customers 
> <https://developers.google.com/google-ads/api/docs/account-management/listing-accounts>
>  
> only gives the accounts that can be accessed with the credentials used 
> without using a login customer Id. This only includes accounts that you are 
> added as user directly into the account. This will also include all 
> accounts even if they are not in the same hierarchy. 
>
> To access a hierarchy using a login customer Id that the underlying 
> accounts don't have you as a user, you can use the get account hierarchy 
> sample 
> <https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy#python>
>  
> instead.
>
> Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 
> 2021 
> Google Ads API and AdWords API Annual Survey 
> <https://google.qualtrics.com/jfe/form/SV_eQbOpf4VxRyyqqO?source=so>
>  
> Regards,
>   
> [image: Google Logo] 
> Aryeh Baker 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2RxAAU:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e4032ee3-3051-47b6-a28b-1bf9ad41c561n%40googlegroups.com.
  • Un... Hadil Charafeddine
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Hadil Charafeddine
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to