A number of customers have reported receiving error messages about one or more Maps, Route or Places APIs being disabled on their project, despite these APIs clearly being enabled in the Google Cloud Platform console.
The issue may be difficult for developers to self-diagnose, especially if they have set the 0 quota override *before* enabling billing on their Google Cloud project, since this 0 quota override might not be directly visible to them.
However, we will describe below the needed troubleshooting steps, and will provide a few ways to resolve this issue.
Note to existing Google Maps API Premium Plan customers: if you are using your Premium Plan projects, ignore troubleshooting and workaround steps involving billing accounts. Also, if workaround (a) below does not work on your Premium Plan project, please contact technical support as described here: https://developers.google.com/maps/premium/support#contact-support
1. Identify error messages indicating the API is not activated, enabled or authorized for project.
While the exact error messages may vary per API, some the most common ones are listed below:
In the application:
Instead of a map, the following error message will be displayed on a gray background:
Oops! Something went wrong.
Service response (JSON):
error_message: “This API project is not authorized to use this API.”,
results: [ ],
2. Check which project the used API key belongs to (if needed).
For each of your projects in the drop-down menu at the top of Google Cloud Platform console: To see the full list of credentials for that project, navigate to APIs & Services > Credentials in the side menu.
3. Verify that the affected API is enabled in your project.
For the affected project in Google Cloud Platform console:
To see the full list of enabled APIs side menu, navigate to APIs & Services > Dashboard in the side menu.
4. Check the billing status of your affected project.
For the affected project in the Google Cloud Platform console:
To see its billing status, navigate to Billing (> Overview) in the side menu.
If you are *prompted to link the project to a billing account*, or the *project is not listed* under any of your billing accounts in the drop-down menu on the Overview page, the project *billing is disabled*.
If the *project is listed* on the overview page, *billing is enabled*.
(a) Affected project had *billing disabled*, or a 0 quota override has been added *after* billing was enabled:
1. For the affected project in Google Cloud Platform console:
To see the quota configuration of your API, navigate to APIs & Services > Dashboard in the side menu, then click the affected API, then click on the Quotas tab.
2. If you see any daily quotas with the limit set to 0, hit the pen icon, change the value to any suitable non-zero value and click “Save.” For projects that don’t have billing enabled, the only allowed alternative may be 1 for Google Maps Platform APIs.
3. If billing was *not* enabled for the project, enable it.
You can either do this by once again hitting the pen icon in the API Quotas tab, and clicking “enable billing for this project”, or by navigating to the billing overview page, as described in troubleshooting step 4 (above).
4. Wait 5-15 minutes.
5. Retry using your application.
If workaround (a) did not fix the issue, and are either a Google Maps API Premium Plan customer, or you could see zero-value quotas but were unable to modify them, contact technical support.
For Google Maps API Premium Plan customers, the instructions are listed here: https://developers.google.com/maps/premium/support#contact-support
Other customers should follow the steps described here:
Otherwise, see if workarounds (b) or (c) below fix the issue for you.
(b) Affected project had *billing enabled*, and you wish to keep all your existing Google services on the same project, or you cannot easily change the current API key of your affected application:
Warning: this workaround *may* cause short production outages on other otherwise unaffected Google services that use the same project!
1. Temporarily disable billing on the project.
Follow troubleshooting step 4 (above) to identify the correct billing account for the project. Then click on the three-dot menu icon, and select Disable billing from the drop-down.
2. Repeat steps in workaround (a).
This time around, any non-billable 0 quota overrides should be visible when visiting the Quotas tab for the affected API.
If the above did not work, or you cannot disable billing without affecting other services but you can relatively easily change the API key in affected your application, just try workaround (c) below.
(c) Create new project and keys:
1. Create a new project.
2. Enable the APIs you need.
3. Enable billing for the project.
4. Create API keys for the new project.
Make sure you copy over the API key restrictions from the old project!
If you didn’t already use API key restrictions, we strongly advise you to add them before using a key in production or exposing it on publicly visible web pages.
More information about API key best practices for Google Maps Platform can be found here: https://developers.google.com/maps/api-key-best-practices
5. I each of your affected applications, replace the API key from the old project with the corresponding key from the new one.