How do I get an MCC account's ID from an authenticated user without asking the user to insert it manually?

75 views
Skip to first unread message

Donald Moore

unread,
Feb 20, 2020, 1:18:53 PM2/20/20
to AdWords API and Google Ads API Forum
So, I've mulled over the documentation for a few weeks now and I can't figure this out.

When a User logs into my app using the Google OAuth2 setup strategy, how do I get the ID of the MCC account associated with that user?

I'm trying to avoid asking the user to input their MCC account ID manually.

Every time I see this question asked, I get the same answer that doesn't help me: "Create a test account".

Please help.

Google Ads API Forum Advisor Prod

unread,
Feb 20, 2020, 4:46:11 PM2/20/20
to donaldway...@gmail.com, adwor...@googlegroups.com

Hi Donald,

Thank you for reaching out to us. It looks like you want to build out an OAuth flow, where users grant your application permission to access their AdWords account. Please see this documentation for OAuth, and please follow instructions for “Web App” flow instead of the “Installed Application” flow. This should help you achieve the functionality you desire. Let me know if you have further questions.

Thank you,
Bryan, Google Ads API Team



ref:_00D1U1174p._5001UV1jV2:ref

Donald Moore

unread,
Feb 20, 2020, 5:10:05 PM2/20/20
to AdWords API and Google Ads API Forum

please follow instructions for “Web App” flow instead of the “Installed Application” flow. This should help you achieve the functionality you desire. Let me know if you have further questions.


Thanks, Bryan,

So, does that mean that I can't use the PHP client library in order to access this data? 

Donald Moore

unread,
Feb 20, 2020, 5:14:46 PM2/20/20
to AdWords API and Google Ads API Forum
The documentation doesn't have a guide for web app flow with the PHP client library.

Donald Moore

unread,
Feb 21, 2020, 2:25:38 PM2/21/20
to AdWords API and Google Ads API Forum
Bryan,

I still can't figure this out. I've tried the docs, but nothing explains what I'm trying to do.

Here is a similar issue from 2013 where a user is trying to do the same thing that I'm doing. They used the InfoService to get the authenticated user's MCC client ID, but that service has been deprecated: https://groups.google.com/forum/#!topic/adwords-api/sX9h-48LuKY

Google Ads API Forum Advisor Prod

unread,
Feb 21, 2020, 2:31:44 PM2/21/20
to donaldway...@gmail.com, adwor...@googlegroups.com

Hi Donald,

Thank you for being patient with us. Could you please try these Web Flow OAuth instructions listed here and let me know if you run into further issues?

Reply all
Reply to author
Forward
0 new messages