Pete Bowen's site

Google Ads API: Authorization for multiple users.

Published April 2021. Last updated July 2026.

The Google Ads API code examples use a single OAuth2 refresh token, hard coded into a settings file.

This is usually all you need to do if you’re building an internal-use-only tool for your agency. Your manager account’s OAuth2 refresh token gives access to linked client accounts with administrative access. If you can make changes via your manager account you can make changes via the API.

This doesn’t work if you’re building a tool for other agencies or advertisers to use. It would be clunky to link every user to your manager account.

Instead you follow the OAuth2 web application (web server) flow to allow users to let your app access their accounts.

Here’s how it works

  1. A user registers on your app. Ask for their Google Ads account id as part of the registration flow and store it in your uses table with their email address etc.
  2. Your app redirects the user to Google to ask for permission.
  3. Google will show the user a screen that asks them if they want to give your app permission to access their Google Ads account.
  4. If the user allows your app permission, Google redirects the user back to your app.
  5. The redirect includes an OAuth2 refresh token for the user. Your app should save the refresh token somewhere secure because you'll need this every time you access the API for this user.

When your app makes a request to the Google Ads API you use the user's saved OAuth2 refresh token, not your manager account refresh token.

Need help with the Google Ads API? Email me (me@pete-bowen.com) for a no-cost, no-obligation chat. I’m always happy to talk Google Ads and code.

Most Google Ads Problems Aren't Google Ads Problems
If my writing resonates with you, I'd like to give you a copy of my book, Profitable Google Ads. The book was written for business owners, but many PPC professionals have found it valuable too.
Before you download it, what describes you best?

Related articles

Why a Google Ads account audit Isn't enough

Testing Google Ads for an RV Campground

Why negative keywords are becoming less effective in Google Ads

What’s the right bidding strategy for a brand new Google Ads account?

You can't run profitable Google Ads if your pipes are leaking

The campaign looks good but the ads aren't profitable

Topics you'll find on this site

Agency insights

Thoughts and lessons on client selection, burnout, pricing, and modernising legacy accounts, from someone who's run a Google Ads for years.

Conversion tracking

Understand what happens after someone clicks your advert. Subjects include offline conversions, CRM integration, attribution, auditability and marketing instrumentation.

Essays and thinking

Articles about marketing, engineering, AI and problem solving that don't fit neatly into the other topics. These are some of the ideas and experiences that have shaped how I think.

Google Ads for lead generation

Learn how to use Google Ads to generate profitable leads. Subjects include campaign strategy, bidding, targeting, optimisation and the challenges of running lead generation campaigns.

Landing pages

Things I've learned about high-converting landing pages. Subjects include copywriting, page structure, forms, trust, conversion rate optimisation and user experience.

Lead quality

Understand why some leads become customers while others don't. Subjects include diagnosing poor leads, qualification, filtering junk leads and improving the feedback you send to Google Ads.

Sales Process

What happens after a lead has been generated determines if Google Ads is profitable. Subjects include first contact, follow-up, quoting, lead nurturing and turning more enquiries into customers.