911 Marketing Hub
Google API Setup
Google API Setup

Configure Google Ads API v18 OAuth 2.0 credentials to enable live campaign push from the Marketing Hub.

πŸ”Œ Connection Status
Current Google Ads OAuth connection status
Google Ads OAuth
Checking…
Connect Google Account
πŸ“‹ Setup Guide β€” Google Ads API v18
Follow these steps to get your credentials and enable live campaign push.
1
Create a Google Cloud Project
Go to console.cloud.google.com, create a new project (e.g. 911-marketing-hub), and enable the Google Ads API under APIs & Services β†’ Library.
2
Create OAuth 2.0 Credentials
APIs & Services β†’ Credentials β†’ Create Credentials β†’ OAuth Client ID.
Application type: Web application.
Add authorized redirect URI:
https://services-leads-marketing-hub.pages.dev/api/auth/google/callback
Save your Client ID and Client Secret.
3
Apply for Google Ads API Access
Go to Google Ads Manager β†’ Tools β†’ API Center.
Apply for a Developer Token. Start with Basic access (test account). You'll receive a token like ABcdEf1234567890.
4
Add Environment Variables to Cloudflare
In Cloudflare Pages β†’ Settings β†’ Environment Variables, add:
GOOGLE_ADS_DEVELOPER_TOKEN = your-developer-token GOOGLE_ADS_CLIENT_ID = your-client-id.apps.googleusercontent.com GOOGLE_ADS_CLIENT_SECRET = your-client-secret GOOGLE_ADS_CUSTOMER_ID = your-ads-account-id (digits only)
5
Authorize via OAuth
After deploying with the env vars set, click Connect Google Account above. This starts the OAuth 2.0 flow and stores refresh tokens in your KV namespace for future API calls.
πŸ”§ All Environment Variables
Set these in Cloudflare Pages β†’ Settings β†’ Environment Variables (Production)
VariableDescriptionRequired
GOOGLE_ADS_DEVELOPER_TOKENFrom Google Ads Manager API CenterRequired
GOOGLE_ADS_CLIENT_IDOAuth 2.0 Client ID from Google Cloud ConsoleRequired
GOOGLE_ADS_CLIENT_SECRETOAuth 2.0 Client SecretRequired
GOOGLE_ADS_CUSTOMER_IDGoogle Ads account ID (numbers only, no dashes)Required
CLOUDFLARE_API_TOKENFor deploying landing pages to Cloudflare PagesOptional
CLOUDFLARE_ACCOUNT_IDYour Cloudflare account IDOptional
TELEGRAM_BOT_TOKENTelegram bot token for lead notificationsOptional
TELEGRAM_CHAT_IDTelegram chat/channel ID for notificationsOptional
META_ACCESS_TOKENMeta (Facebook) access token for Meta Ads pushOptional
META_AD_ACCOUNT_IDMeta ad account IDOptional
☁️ Cloudflare Bindings (Already Configured)
These are set in wrangler.jsonc and bound to this deployment.
KV Namespace : KV β†’ 40cccfe0b3734c3a8c16300e3300e6aa D1 Database : DB β†’ 911-marketing-hub-production (04f5ae3a-2273-49e5-8927-e7dcfa0afac1)