Knowledge base / API keys

Fix ApiNotActivatedMapError on Google Maps

The key is valid, but the API it is calling was never switched on for that Cloud project. Most often the key was created in one project and the API enabled in another.

How to tell this is your problem

  • ApiNotActivatedMapError in the console on every page load.
  • Static Maps or Geocoding may work while the JavaScript map does not.
  • Nothing changed on your site — someone tidied up Cloud projects.

Why it happens

Every Google Maps Platform API is enabled per project. A key inherits the project’s enabled APIs, so a key from a project without the Maps JavaScript API can never load a map.

The fix, step by step

  1. 01In Cloud Console, confirm which project the key belongs to (Credentials lists the project at the top).
  2. 02Open APIs & Services → Library and search for Maps JavaScript API.
  3. 03Press Enable, then enable Places and Geocoding if your page uses search or address lookup.
  4. 04If the key has API restrictions set, add the newly enabled APIs to its allow-list.

Confirm it is fixed

Reload the page with the console open — the error disappears immediately once the API is enabled; no key change is needed.

Check whether this is your error

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

Related articles