DEV Community

Memo
Memo

Posted on

Google Cloud Service Accounts: Preventing Broken Client Maps and Form Integrations

Article image
Google Cloud Service Accounts: Preventing Broken Client Maps and Form Integrations
It is one of the most frustrating phone calls a web agency owner or lead developer can receive from a client:

"Our website's contact form stopped submitting, reCAPTCHA says our site is over quota, and the map on our location page is a grey box that says 'This page can't load Google Maps correctly.' We haven't touched the site. Did you break it?"

When a client's core site features break without any recent code deployment, the culprit is almost never a bad line of CSS or a failed plugin update. Instead, it's a silent infrastructure failure in the Google Cloud Console.

Whether it's an unbilled Google Maps JavaScript API, an expired service account key, a reCAPTCHA quota you didn't know had shrunk, or a mismatched HTTP referrer restriction, third-party cloud APIs are fragile dependencies. When these credentials fail, they hurt user experience, sink conversion rates, and land in your agency's lap as a support ticket — even though nothing in the codebase changed.

This guide explains why Google Cloud Platform (GCP) credentials fail silently on client websites, how to troubleshoot the most common errors, what changed in Google's pricing this year that agencies need to know about, and how to build a proactive SOP around it.

  1. Anatomy of a Silent Cloud Outage Modern websites lean on third-party APIs for interactive functionality. Unlike hosting or domain renewals — which typically send explicit warning emails to the account owner — Google Cloud services operate under programmatic rule sets that can degrade the moment a parameter is violated, with no guaranteed advance notice to whoever built the site.

[ Client Website ] ──► [ Google Cloud Platform (GCP) ]

┌───────────────────────┼───────────────────────┐
▼ ▼ ▼

  1. Maps API Failure 2. reCAPTCHA Failure 3. Service Account Key
    (Billing / Key) (Quota Exceeded) (Expired / Rotated)
    Google Maps Platform — renders dynamic maps, geocoding, and address autocomplete.
    Google reCAPTCHA / Cloud Fraud Defense — validates form submissions to block spam bots.
    GCP service account keys — let backend servers authenticate directly with Google APIs (Cloud Storage, BigQuery, Sheets integrations, etc.).
    When any of these hits an unmonitored quota, an unlinked billing account, or an expired credential, the API rejects calls from the client's application — usually with no alert sent to whoever manages the site.

  2. Google Maps API Failures and Billing
    The grey map box is a classic agency headache, and the billing model behind it changed materially in the last 18 months.

What changed: the $200 credit is gone
For years, every GCP billing account with Maps enabled received a $200 monthly recurring credit, which covered most small and mid-size implementations for free. That credit was retired on March 1, 2025. In its place, Google now gives each Maps Platform SKU its own free monthly usage threshold — for example, Essentials-tier SKUs like Dynamic Maps and Geocoding get a set number of free requests per month — and usage above that threshold bills at published per-SKU rates, with expanded automatic volume discounts.

The practical effect for agencies: a client project that ran "for free" for years under the old shared $200 pool can now generate a real invoice the moment any single API it uses crosses its own threshold — even if every other API on the same project is barely used. If you inherited a client's GCP project and haven't looked at its billing setup since before March 2025, it's worth checking which SKUs are active and whether current usage still falls under the new thresholds.

A billing account is still required to use Maps Platform at all, even for usage that stays within the free thresholds.

Common Maps JavaScript API console errors
Opening browser dev tools (F12) on a broken map page usually reveals a specific error code. Per Google's official error reference, these are the ones agencies run into most:

Error Code Root Cause Fix
MissingKeyMapError No key parameter was passed in the script tag. Add a valid key=YOUR_API_KEY parameter to the script source.
ApiNotActivatedMapError The key exists, but the Maps JavaScript API isn't enabled on that project. In GCP, go to APIs & Services > Library and enable the Maps JavaScript API.
BillingNotEnabledMapError The GCP project has no active billing account linked. Link a valid payment method under Billing in the GCP project.
RefererNotAllowedMapError The current URL isn't on the key's allowed HTTP referrer list. Update the key's referrer restrictions in GCP to match the live domain.
One correction worth flagging if you've seen this error referenced elsewhere: it's RefererNotAllowedMapError — spelled with a single "r" in "Referer," matching the (technically misspelled, but standardized) HTTP Referer header itself, not "Referrer."

Pro tip on referrer restrictions: include both https://example.com/* and https://.example.com/. Omitting the wildcard subdomain pattern is a common reason maps work on the root domain but break on www or staging subdomains.

  1. reCAPTCHA: A Major 2026 Pricing Change Agencies Need to Know About This is the section of the old playbook that's most out of date. The free-tier assumptions many developers still carry around no longer hold.

The free tier dropped 99%
For years, reCAPTCHA v2 and v3 offered a free allowance of roughly 1,000,000 assessments per month — generous enough that most agency client sites never thought about quota at all. That changed in 2026. reCAPTCHA is now billed under Google's Cloud Fraud Defense billing model, with a restructured tier system:

Tier Cost Usage Limit
Essentials Free Up to 10,000 assessments per calendar month per organization (aggregated across all sites/keys on that org)
Premium $8/month flat for 10,001–100,000 assessments/month; $1 per 1,000 above that Requires a linked billing account
Enterprise Custom, volume-based Contact sales
Per Google's current billing documentation, once an organization on the Essentials tier exceeds 10,000 cumulative assessments in a calendar month, further requests return a 429 Resource Exhausted quota error rather than continuing to pass silently.

The detail that catches most agencies off guard: an "assessment" isn't the same as a form submission. If reCAPTCHA v3 is loaded on every page (Google's own recommended pattern, for building a behavioral risk score), every page view counts toward the quota — not just completed submissions. A moderate-traffic site can burn through 10,000 monthly assessments quickly on page loads alone, long before anyone fills out a form.

What this means operationally
A client site that has run reCAPTCHA "for free" for years may now need a billing account linked, or it will start hitting the quota ceiling.
Because the failure mode is a quota error rather than an invoice, the first sign of trouble is often "the contact form stopped working," not a billing alert.
If you're auditing a client's setup, check whether their reCAPTCHA keys are already migrated to the Cloud Fraud Defense billing model — legacy standalone reCAPTCHA keys created outside a Cloud project may need remediation separately.
Given how significant this shift is, it's worth treating "check reCAPTCHA tier and monthly assessment volume" as its own line item in any client site audit, separate from the general Maps/billing check.

  1. Service Account Keys: What "Expiration" Actually Means Service accounts authenticate backend server-to-server communication — for example, a WordPress contact form writing directly to a Google Sheet, or a script uploading files to Cloud Storage.

[ Web Server ] ──(Private JSON Key)──► [ GCP APIs / Services ]
Keys don't expire by default
This is a common misconception worth correcting: a user-managed GCP service account key does not expire on its own. By default it remains valid until someone manually deletes the key or deletes the service account entirely. Expiration only happens if:

An administrator manually sets an expiry when creating the key, or
The organization has configured the iam.serviceAccountKeyExpiryHours organization policy constraint, which lets admins cap the usable lifetime of newly created keys at the org, folder, or project level (up to a maximum of 2,160 hours — 90 days). This policy does not retroactively affect keys that already exist.
So if an agency inherits an enterprise client's GCP project and that client's IT department has this org policy in place, new keys will die on schedule — but existing keys created before the policy went into effect keep working indefinitely unless someone rotates them manually.

Google's own guidance: rotate manually, don't rely on auto-expiry
Google's current IAM documentation recommends rotating service account keys at least every 90 days to limit the damage window from a leaked key — but explicitly advises against relying on expiring keys as the rotation mechanism, because a key that silently expires without being replaced first causes an outage rather than a controlled handoff.

The more significant shift in Google's own guidance, though, is a push away from long-lived JSON keys entirely. Google now recommends Workload Identity Federation (for workloads running outside GCP) or attached service accounts (for workloads running on GCP infrastructure) as the preferred alternative to static keys, since both eliminate the downloadable private key file as an attack surface altogether. For legacy integrations that still require a JSON key — common in older WordPress plugins, on-prem CI/CD pipelines, and some SaaS connectors — manual 90-day rotation tracked on a calendar remains the practical fallback.

When a key does expire or get revoked without warning, the failure shows up as 401 Unauthorized or 403 Forbidden errors in server-side logs (PHP error logs, Node application logs, etc.) rather than anywhere visible in the browser — which is why these outages often cost developers hours of debugging application code before anyone thinks to check the credential itself.

  1. Master SOP: Auditing Agency API Assets Step 1: Consolidate client GCP access. Avoid creating client API keys inside your agency's personal, unbilled GCP project, and avoid clients spinning up keys in personal Gmail accounts with no organizational oversight. Best practice is a dedicated GCP project inside the client's own Workspace organization (or a segregated project inside your agency's parent org), with the client's own payment method linked directly to that project's billing account — so a lapsed card is the client's billing problem to fix, not a silent liability sitting on your agency's card.

Step 2: Enforce key restrictions. Restrict JavaScript API keys (Maps, Places, reCAPTCHA) to the client's production and staging domains via HTTP referrer rules, and restrict every key to only the specific APIs it actually calls. An unrestricted key embedded in client-side HTML can be scraped and abused within hours.

Step 3: Establish a tracking system. Don't rely on memory or scattered spreadsheets to track which client owns which GCP project, which key belongs to which domain, or when a credential is next due for rotation review.

     Agency API Audit SOP
              │
Enter fullscreen mode Exit fullscreen mode

┌───────────────┼───────────────┐
▼ ▼ ▼
Step 1 Step 2 Step 3
Consolidate Enforce Establish
Project Access Restrictions Tracking

  1. Where InstaRenewal Fits — and Where It Doesn't As an agency's client base grows, keeping track of which domain has which Google Maps key, which reCAPTCHA tier a site is on, and when a service account key is due for a rotation review becomes a real operational bottleneck. This is squarely the kind of renewal-tracking problem InstaRenewal is built for — but it's worth being precise about what that means in practice.

What InstaRenewal does here:

Renewal and rotation-review date tracking. You can log a due date for a service account key's next rotation review or a reCAPTCHA billing tier check, the same way you'd track an SSL certificate or domain renewal, and get an expiration alert ahead of that date.
Asset and ownership record-keeping. InstaRenewal can hold a record noting which client a given Maps API key, reCAPTCHA site key, or GCP project belongs to, and which team or contact is responsible for maintaining it — useful for exactly the "did we break it?" phone call this article opens with.
Domain-to-asset linking. Tying a client's domain record to related assets (their Maps key, their hosting account, their SSL certificate) so your team has one place to look when troubleshooting a broken feature on that domain.
What InstaRenewal does not do: it doesn't store the service account's private JSON key file or any other credential material, it doesn't hold client payment card details, it doesn't perform live API quota monitoring or query GCP directly for usage data, and it isn't a security audit trail for credential rotation events or IAM changes. Those are identity, credential-storage, and security-monitoring functions that sit outside InstaRenewal's scope — the tool tracks that a renewal or review is due and who owns the asset, not the credentials themselves or their live usage. For actual key storage, use GCP's own IAM console or a dedicated secrets manager; for usage and quota monitoring, use GCP's Cloud Monitoring and budget alerts.

  1. Quarterly Agency Checklist [ ] Google Maps billing check — confirm every client GCP project with an active Maps key has a valid, non-expired payment method linked, and check which SKUs are in use against the current per-SKU free thresholds (not the old $200 credit model). [ ] HTTP referrer restrictions — audit client-side API keys to confirm they're restricted to authorized domains, including wildcard subdomains. [ ] reCAPTCHA tier and volume check — confirm which billing tier each client site is on and whether current traffic (counted as assessments, not just submissions) is approaching the 10,000/month Essentials ceiling. [ ] Service account key review — identify active user-managed keys older than 90 days; where practical, migrate to Workload Identity Federation instead of rotating another static key. [ ] Renewal tracker update — log key rotation review dates, reCAPTCHA billing tier, and asset ownership for each client in InstaRenewal (or your tracking tool of choice). Silent GCP failures are rarely the result of a code change — they're the result of a billing threshold, a quota, or a credential expiring somewhere nobody was watching. Building this kind of review into a recurring SOP, backed by a centralized renewal record instead of memory or scattered spreadsheets, is what keeps a client's map, form, and backend integrations from becoming a surprise support ticket.

Sources
Google Maps Platform — Billing and Pricing FAQ (March 2025 credit-to-threshold transition)
Google Maps Platform — Public Programs / Pricing
Google Maps JavaScript API — Error Messages Reference
Google Cloud — reCAPTCHA / Cloud Fraud Defense Billing Information
Google Cloud IAM — Service Account Key Rotation

Top comments (0)