Knowledge base / Client ID (legacy)

Fix InvalidClientIdMapError: move from client ID to an API key

Your page still authenticates with a Google Maps Platform Premium Plan client ID. Google deprecated client IDs on 26 May 2025 and says they can no longer be used after 31 May 2026. Correcting the client ID won't bring the map back for good. The page needs an API key.

How to tell this is your problem

  • The Maps script tag on the page contains client=gme-… instead of key=AIza….
  • The console shows InvalidClientIdMapError.
  • The map worked for years with no changes on your side, then started failing on and off during 2026 and now fails every time.
  • Server-side calls from the same system (geocoding, Static Maps images) may be failing too, with REQUEST_DENIED or similar responses.

This is what the console shows:

Google Maps JavaScript API error: InvalidClientIdMapError
https://developers.google.com/maps/documentation/javascript/error-messages#invalid-client-id-map-error

Our scan reads the loader URL as well as the console. If the page sends client= without key=, the report flags it even before Google returns an error.

Why it happens

Client IDs belonged to the old Premium Plan, which Google no longer offers to new customers. Google's error reference says client IDs have been deprecated since 26 May 2025 and can no longer be used after 31 May 2026. From May 2026 Google restricted access in phases, with outages getting longer and more frequent towards the end date. That explains maps that failed for a few hours and then recovered on their own.

The error can also mean the value itself is wrong, for example a client ID typed without its gme- prefix. Either way the answer is the same now: replace it with an API key.

Need the map back today?

Google documents a temporary reactivation for outages during migration. Open the Google Maps Platform Credentials page, find the Cloud project linked to your client ID and click the unpause icon on that row. Google says service is usually restored within a few hours. For a longer exemption, Google asks you to contact Google Maps Platform Support with the client ID, your use case, a target migration date and the business impact.

Treat this as a stopgap. It doesn't replace the migration below.

The fix, step by step

These steps follow Google's client ID migration guide. Do them in order. Skipping the quota and restriction steps is how a migrated map breaks a second time.

  1. 01Find the Cloud project linked to your client ID. Every Premium Plan client ID has an associated Cloud project. Create the API key in that project so usage stays under the same billing account and support contract.
  2. 02Make sure the project has an open billing account. Google requires this before you create the key. If billing is missing, see the client billing guide.
  3. 03Check what still uses the client ID. In Cloud Console open the Google Maps Platform Metrics page, filter credentials by project_number: followed by your project number, and group by API, then by domain. That shows every site and API still calling with the client ID.
  4. 04Create an API key under APIs & Services → Credentials in that project.
  5. 05Restrict it before you use it. Set an application restriction of Websites and copy across the authorised URLs from your client ID. Then set API restrictions to only the Maps APIs the site calls.
  6. 06Review quotas. Client ID traffic from the Maps JavaScript API services (Directions, Distance Matrix, Elevation, Geocoding, Places) didn't count against project quota. API key traffic does. Check the Quotas page has room for your peak traffic.
  7. 07Update the loader on every page, as shown below.
  8. 08Watch the Metrics page after you deploy. Traffic grouped under project_number:… should fall towards zero.
  9. 09Pause the client ID once nothing important uses it. Google recommends this to protect the credential.
Referrer rules are stricter for keys

An authorised URL on a client ID also covers all its subdomains and subpaths. API key website restrictions don't work that way. Authorising example.com on the client ID covered www.example.com. On a key you need a pattern such as *.example.com/* as well as example.com/*. Get this wrong and you swap one error for RefererNotAllowedMapError. See how to write referrer patterns.

Changing the loader

Swap client= for key=. Remove any signature=. If you used channel= for usage reporting you can keep it, but API keys only accept numeric channel values, so rename text channels such as store-locator to numbers.

HTML
<!-- Before: Premium Plan client ID -->
<script src="https://maps.googleapis.com/maps/api/js?client=gme-yourcompany&channel=storefinder&callback=initMap"></script>

<!-- After: restricted API key, numeric channel, async loading -->
<script async
  src="https://maps.googleapis.com/maps/api/js?key=AIzaSy...your-key&channel=101&loading=async&callback=initMap"></script>

If you use Google's inline bootstrap loader, pass key in its options instead of client. Load over https:// only.

Server-side and Static Maps requests

The same system often makes web service calls signed with the client ID. Google's guide splits them in two:

  • Geocoding, Elevation, Time Zone, and the legacy Directions and Distance Matrix APIs: replace client= with key= and drop signature=. Use a separate key restricted by IP address, never the browser key.
  • Maps Static API and Street View Static API: keep signing requests, but with the signing secret that belongs to the API key, not the old client ID secret. The algorithm doesn't change. Unsigned requests are only accepted in small numbers.

Some newer APIs, including Places API (New) and Routes API, don't accept client IDs at all. If you were planning that move, the key comes first. See moving from Directions to Routes.

WordPress, CMS and agency sites

Older store locator and maps plugins sometimes had a separate “client ID” or “Premium Plan” field. Clear it and fill in the API key field instead. If the plugin has no API key field at all, it predates current loading practice and probably needs replacing. Check every place a loader can come from: theme options, plugins and page builder widgets. Our guide to page builder key fields lists the common ones.

Confirm it is fixed

Open the page in a private window with the console open. You should see no Maps errors and the tiles should load. View source and confirm no client= remains in any Maps URL.

Then run a scan. It lists every Maps loader on the page, so a second plugin still sending the client ID shows up. A day later, check the Metrics page again to make sure client ID traffic from that site has stopped.

Common questions

Can I still use a Google Maps client ID in 2026?

Not reliably. Google says client IDs can no longer be used after 31 May 2026. A temporary reactivation exists for outages during migration, but it is a stopgap and you should move to an API key.

Will moving to an API key change what I pay?

The key should live in the Cloud project already linked to your client ID, so usage is billed to the same billing account. Check your quotas, because some client ID traffic didn't count against project quota and key traffic does.

Do I still need a URL signature with an API key?

For Maps JavaScript API and most web services, no. Remove it. Maps Static API and Street View Static API still need signed requests, using the signing secret for the API key.

What does channel= do after migration?

It still splits usage reports by channel, but API keys only accept numeric values. Replace text channel names with numbers and keep a note of what each number means.

Check whether this is your error

A scan tells you in about twelve seconds, from a clean session.

Related articles