Find my userid or email id

20 views
Skip to first unread message

Chandan Sharma

unread,
Jul 9, 2024, 4:37:39 AM7/9/24
to Google Ads API and AdWords API Forum

Dear Google Ads API Community,

I'm working on a project where I need to programmatically find my User ID or email ID using the Google Ads API. Specifically, I need to identify Customer IDs for which I have administrative access.

Currently, I can retrieve a list of accessible Customer IDs, but this includes accounts where I am not an admin. I also have access to information about admin, including their User IDs and emails for this list of accessible list of customer . If there's a method to determine my own User ID or email ID programmatically, I could compare it with the available admin details to identify Customer IDs where I am an admin.

Could someone please advise if there's a way to retrieve my User ID or email ID via the Google Ads API, or suggest an alternative approach to achieve this goal?

Thank you for your assistance.

Best regards,
Chandan Sharma

Google Ads API Forum Advisor

unread,
Jul 9, 2024, 10:17:04 AM7/9/24
to chandan...@knorex.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

You can retrieve the user ID and email address via the Google Ads API using the customer_user_access report. Kindly check the below query:
SELECT customer_user_access.user_id, customer_user_access.email_address, customer_user_access.access_role, customer_user_access.access_creation_date_time, customer_user_access.inviter_user_email_address FROM customer_user_access
I would suggest you refer to the Managing User Access document for more details. Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJoL2:ref" (ADR-00245705)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!


Reply all
Reply to author
Forward
0 new messages