In case it helps, here is the code that I got so far (it probably could be improved a lot and maybe has mistakes, I'm a Python beginner):
def one(request): client = credenciales(request) ga_service = client.get_service("GoogleAdsService") # Get customer resource names from the original code customer_service = client.get_service("CustomerService") accessible_customers = customer_service.list_accessible_customers() customer_resource_names = accessible_customers.resource_names # Prepare a list to store customer data list_clients = [] # Iterate through each customer resource name for resource_name in customer_resource_names: # Extract the customer ID from the resource name custom_id = resource_name.split('/')[-1] # Create a query using the customer_id query = f''' SELECT customer_client.descriptive_name, customer_client.id, customer_client.status FROM customer_client ''' stream = ga_service.search_stream(customer_id=custom_id, query=query ) for batch in stream: for row in batch.results: data_clients = {} data_clients["descriptive_name"] = row .customer_client.descriptive_name data_clients["id"] = row.customer_client.id data_clients["status"] = row.customer_client.status list_clients.append(data_clients) # Pass the list of customer data to the template context = { 'list_clients': list_clients, } return render(request, 'one.html', context) It gives me the error "*authorization_error: USER_PERMISSION_DENIED*" (which I don't understand, because it should be automatically showing the accounts that the user has permission to access, I'm not giving those accounts/IDs manually). On Wednesday, August 9, 2023 at 8:11:45 AM UTC+2 Miguel Angel Garcia wrote: > OK, and what about the second part of my message? > > *If listAccessibleCustomers is not going to provide account names anytime > soon, can you at least provide code examples of how to get that info in the > most efficient and reliable way possible (I need it for Python).* > > On Tuesday, August 8, 2023 at 10:29:57 PM UTC+2 Google Ads API Forum > Advisor wrote: > >> Hi, >> >> Thanks for reaching out to Google Ads API Forum. >> >> With regards to your concern, I have checked this on our side and >> unfortunately this feature on list-accessible-customers is still not >> available on *Google Ads API*. Kindly note that we already raised a >> feature request for this to be available in Google Ads API, subject for >> review. For now, what we can advise you is to follow our *Blog* post or >> *Release* *Notes* for the latest updates in the API. >> >> Links included in this email: >> >> - *Google Ads API - * >> *https://developers.google.com/google-ads/api/docs/start* >> <https://developers.google.com/google-ads/api/docs/start> >> - *Blog - * >> *https://ads-developers.googleblog.com/search/label/google_ads_api* >> <https://ads-developers.googleblog.com/search/label/google_ads_api> >> - *Release Notes - * >> *https://developers.google.com/google-ads/api/docs/release-notes* >> <https://developers.google.com/google-ads/api/docs/release-notes> >> >> >> This message is in relation to case "ref:_00D1U1174p._5004Q2ZM01g:ref" >> >> Thanks, >> >> [image: Google Logo] Google Ads API Team >> >> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e0659f64-8359-4218-818c-7a446c8d0916n%40googlegroups.com.