Hi Xiaoming,

Thanks for your assistance, I was able extract user info.   For other 
developers on the forum here is some code to save a whole lot of research 
[from a developer who relies on low code solutions :-)].  Please note I 
used the python code (*get_keyword_stats.py)*  in the 
developers.google.com/google-ads

def main(client, customer_id=Null):
    ga_service = client.get_service("GoogleAdsService")
    
    query = """
        SELECT customer_user_access.user_id, 
customer_user_access.resource_name, 
customer_user_access.inviter_user_email_address, 
customer_user_access.email_address, customer_user_access.access_role, 
customer_user_access.access_creation_date_time, customer.id, 
customer.manager, customer.descriptive_name, customer.currency_code FROM 
customer_user_access"""

    # Issues a search request using streaming.
    customer_id='xxxxxxxxxx'
    search_request = client.get_type("SearchGoogleAdsStreamRequest")
    search_request.customer_id = customer_id
    search_request.query = query
    response = ga_service.search_stream(search_request)
 
    #used below loop to find the attributes in the response object
    #for att in dir(response):
      #print (att, getattr(response,att))
    print(response._stored_first_result)  

Cheers


On Thursday, May 13, 2021 at 3:22:37 PM UTC-4 adsapiforumadvisor wrote:

> Hi Avinash,
>
> Thank you for reaching out. This actually could be achieved by simply 
> replacing the query in this code 
> <https://github.com/googleads/google-ads-java/blob/master/google-ads-examples/src/main/java/com/google/ads/googleads/examples/reporting/GetKeywordStats.java>
>  
> and fetching the needed user info from the customer_user_access 
> <https://developers.google.com/google-ads/api/fields/v7/customer_user_access>
> .
>
> Thanks and regards,
> Xiaoming, Google Ads API Team
>  
>
> [image: Google Logo] 
> Xiaoming 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2HAA3w: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 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ce99109b-80af-41aa-8b04-3b93f73465a7n%40googlegroups.com.

Reply via email to