Faruk
What is your question? What are you seeing? It's not really clear what the issue is.
Edit:
You tagged this with Google-Ads-API, that's the old API. My code below is for the new Google Ads API but might point you in the right direction if you need to use the older one.
You're using the correct service, just not the correct method. You need to use the list_accessible_customers() method:
def get_mccs_and_direct_admin_only_accounts(client):
customer_service = client.get_service('CustomerService', version='v6')
try:
accessible_customers = customer_service.list_accessible_customers()
resource_names = accessible_customers.resource_names
for resource_name in resource_names:
print('Customer resource name: "%s"' % resource_name)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…