login_customer_id for multiple accounts

23 views
Skip to first unread message

Vk Kv

unread,
Nov 4, 2022, 6:24:26 AM11/4/22
to Google Ads API and AdWords API Forum
Hello,

I'm migrating my app from AdWords to GoogleAds. My test email contains multiple manager accounts, some of them are empty or disabled (screenshot "accounts").
When I'm trying to get account hierarchy or do anything with customer account, linked to the manager, I have to pass login_customer_id. But if customer account is linked to a different manager account, I have to switch back and forth between login_customer_ids, which is pain, because it slows the app down. 

I also use list_accessible_customers() to get initial list of accounts that I have on particular email, and, as I mentioned, not everywhere I can retrieve account hierarchy because these accounts can be disabled. When I retrieve customers via googleads_service.search, I can filter in query by customer_client.status = 'ENABLED'. But how can I filter the initial set, that I retrieve through  list_accessible_customers()?

Thanks in advance.accounts.png

Google Ads API Forum Advisor

unread,
Nov 4, 2022, 8:30:45 AM11/4/22
to viktorko...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for posting your concern. I am from the Google Ads API team and let me provide support to your concern.

Please see my insights below to the following items:

"When I'm trying to get account hierarchy or do anything with customer account, linked to the manager, I have to pass login_customer_id. But if customer account is linked to a different manager account, I have to switch back and forth between login_customer_ids, which is pain, because it slows the app down. "
-Please note that you the login_customer_id, this is where you place the customer ID of the Google Ads account where the user account that you've used in the authentication has direct access. With this, you really need to change the value of the login_customer_id if you are switching Oauth2 credentials to manage specific accounts.


"I also use list_accessible_customers() to get initial list of accounts that I have on particular email, and, as I mentioned, not everywhere I can retrieve account hierarchy because these accounts can be disabled. When I retrieve customers via googleads_service.search, I can filter in query by customer_client.status = 'ENABLED'. But how can I filter the initial set, that I retrieve through  list_accessible_customers()?"
I am afraid that it is not possible to filter the list_accessible_customers to get the enabled accounts only. You will need to indeed use the customer_client or customer to know the status of the accounts that will be returned by the list_accessible_customers.

Let me know if you have further questions.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2g09A3:ref
Reply all
Reply to author
Forward
0 new messages