- MediaLauncher
- Posts
- How to connect to the Google Ads API in < 30 mins
How to connect to the Google Ads API in < 30 mins
A quick guide on how to start automating your accounts

Cool tools I found last week
📣 Pablo built a free, open n8n AI ad generator that automatically creates and iterates ChatGPT-powered ad images and saves them to Google Drive. Downloadable JSON workflow file linked in the video description.
💸 Vincent van Pareren released an update of his Google Ads script that now also filters spammy placements in Demand Gen campaigns, offering more control and auto-exclusion based on keywords. DM Adriaan or Vincent for the script.
🔎 Google launched GIGA, a free AI-powered Google Sheets tool that groups keywords by topic to help marketers identify search trends, optimize Broad Match campaigns, and generate ad copy ideas.
🥷 Kudakwashe shared his free Google Ads Script script lets you monitor competitors' in real time by tracking auction positions, detecting promo copy changes, and alerting you when new advertisers enter the market. Script linked in the comments of his post.
📋 Fivos listed the tech stack that took ColdIQ (agency) to $4M in ARR. It includes tools for: AI agents, data scrapters, contact databses, automation, email marketing, webinars, internal & more.
DEEP DIVE
How to connect to the Google Ads API and automate your accounts 🚀
A 30-minute guide on how to start turning your Google Ads accounts into self-driving growth machines.
1. Secure Your Developer Token (≈ 5 min)
Create or reuse a Google Ads Manager (MCC) account. Non-manager accounts can’t request developer tokens.
Go to Admin ▸ API Center in the Google Ads UI and click “Apply”.
Fill out the request form. Describe what you plan to build, include a customer ID (a test account is fine), and acknowledge compliance with rate limits and policies.
Wait for approval (typically 24–48 hours). Your token will show up in the API Center.
In the meantime, use the provisional token with a test account to prototype your script.
Pro tip: Attach a short Loom video or a Google Doc to your application explaining your use case. It helps reviewers approve it faster.
2. Set Up OAuth 2.0 Credentials (≈ 7 min)
In your Google Cloud project, enable the Google Ads API.
Configure the OAuth consent screen. Add a support email, your Google account as a test user, and optionally a logo.
Create OAuth 2.0 credentials:
Choose Web app if you’ll connect through a no-code tool.
Choose Desktop app if you’re working locally in Python.
Copy your Client ID and Client Secret.
Set Authorized JavaScript origins and Authorized redirect URI:
Under Authorized JavaScript origins, leave this empty if you're using a desktop app or local script.
Under Authorized redirect URIs, click "Add URI" and paste the following:
For local scripts:
http://localhost
For tools like Zapier, Make, or n8n: use the specific redirect URL provided in that tool's OAuth setup or app configuration screen.
Make sure to save the changes before proceeding.
3. No-Code Route: Zapier, Make, n8n (≈ 15 min total)
Google Cloud Setup (One-Time)
In your Google Cloud project, set the Authorized redirect URI.
Get the correct redirect URI for your tool:
Zapier: Open your connected app’s settings → copy the "Redirect URL" shown there.
Make (Integromat): Go to the Google Ads OAuth2 module → copy the listed redirect URI.
n8n (cloud/self-hosted): Open credential settings → the redirect URI is shown next to the OAuth2 type.
Paste the redirect URI into your Google Cloud credential settings.
Copy your Client ID and Client Secret.
Connect OAuth Credentials to the Tool
Tool | Where to Paste | Headers to Add |
---|---|---|
Zapier | Use Zapier's Auth/Token URLs |
|
Make | Paste creds in OAuth2 connection | Add |
n8n | Use “Google OAuth2 (Generic)” | Add |
Test the Connection
Run:
GET <https://googleads.googleapis.com/v19/customers:listAccessibleCustomers>
If you get a 200 OK
, you're good to go.
4. Connect Using Python (≈ 5 min)
Get a Refresh Token
Install the helper tool:
pip install google-ads-oauth2
Run the script:
google-ads-oauth2 --client_id=YOUR_CLIENT_ID --client_secret=YOUR_CLIENT_SECRET
Log in through the browser. After authentication, you’ll receive a refresh token in your terminal. Copy and store it securely.
Set Up your
google-ads.yaml
file
developer_token: YOUR_DEV_TOKEN
client_id: YOUR_CLIENT_ID
client_secret: YOUR_CLIENT_SECRET
refresh_token: YOUR_REFRESH_TOKEN
Test the Connection
from google.ads.googleads.client import GoogleAdsClient
client = GoogleAdsClient.load_from_storage("google-ads.yaml")
ga_service = client.get_service("GoogleAdsService")
query = "SELECT customer.id, customer.descriptive_name FROM customer LIMIT 5"
for row in ga_service.search_stream(customer_id="INSERT_ID", query=query):
print(row.customer.descriptive_name)
5. What to Automate First
Budget pacing and pausing based on spend.
Slack alerts for disapproved or limited ads.
Daily or weekly search term exports to BigQuery.
Anything that removes you from repetitive, manual tasks.
GET HELP ON PPC & CUSTOM AUTOMATION
If you’re you’re looking to take your ads game to the next level, consider hiring us to scale your Google & Meta Ads accounts, as well as save 100s of hours on manual work via custom automation.
Book a free 30-minute strategy session where I'll identify specific improvement areas for your accounts and / or for your team, define project scopes, and address potential constraints.
Afterward, you'll receive a comprehensive briefing, for free, with PPC & automation scenarios you can implement yourself or outsource to my team.
Platforms we run & automate: Google Ads, Meta Ads, Linkedin Ads, Native, & more.
The tools we use: Custom scripts, Zapier, Make, n8n, Supermetrics, Funnel, & more.
Have questions or feedback? Hit reply. Loved it? Share it!