Google maps will not work if an API key is provided / This page could not display the Google maps element

I have been using the Google Maps API V3 for a while and it is working fine. Yesterday, I tried adding a static map API application to the application, and I found an error when the image either did not display at all, or I received the error message "InvalidKeyOrUnauthorizedMapError", which says that something must be wrong with the api key, which I used, but I use the same key with other scripts in my application, and they worked perfectly. I double-checked using the developer console and made sure that the static maps API is activated and the key is correct. Then I removed the api key from the request for a static link to the image, and it worked, but I noticed all my other scripts using this key stopped working, displaying these errors:

This page was unable to display Google Maps Element

and the console says:

UrlAuthenticationCommonError: https://developers.google.com/maps/faq#errorcodes . Api key recovery did not work. Removing a key or using a key from another account with the same settings in the developer's console solves the problem, but I need it to be under this account for billing purposes

TL; DR; My application suddenly works only without an API key or with a key from another Google developer account with exactly the same settings. Which might cause a problem with this particular account?

+4
source share
2 answers

I assume it was a mistake with my account. I disabled and deleted all APIs and keys, re-enabled and re-created them, and the problem was fixed.

+2
source

I fixed

In the console, say to add a link in this format:

*. Example.com/*

I changed to this:

* example.com/*

And it worked!

0
source

All Articles