Want to get customer id of authenticated user

26 views
Skip to first unread message

Bruno Finkel

unread,
Jun 19, 2019, 6:18:13 AM6/19/19
to AdWords API and Google Ads API Forum
Hello forum.
Currently, I am building a platform which users can manage their google ads account.

So I implemented user 0Auth Authentication and got access token and refresh token. 
Also, I got developer token and client_id, client_secret.

By the way, I noticed that I need Ads account customer Id to make api call.

The user who logged in out platform will be able to manage his own google ads account. It means that I need his ads account customer ID. How can I achieve this?

How can I get the Google Ads Customer ID of loggedin user?

Please help me. I am totally confused by uncountable googling. :(

Thanks.

Google Ads API Forum Advisor Prod

unread,
Jun 19, 2019, 1:42:54 PM6/19/19
to adwor...@googlegroups.com
Hello Bruno,

I understand your concern. When you have all the credentials to make the API call except customer id, first you have make a API call to CustomerService.ListaccessibleCustomers to get list of accounts that can be accessed via the credentials you have. Please note that to make API call to ListAccessibleCustomers you don't need a customer cId. 

Once the above call is successful, it will result the resource name of all the Google Ads customer ids for which the credentials has access to. Please let me know if you have any further questions. 

Regards,
Sai Teja, Google Ads API Team

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