Reputation: 373
I've been using google maps API V3 for a while now and it was working fine. Yesterday i tried adding Static Maps API to my application and i encountered an error where the image was either not displayed at all or i get an error saying 'InvalidKeyOrUnauthorizedMapError' which tells me something must be wrong with the api key i've been using, but i use the same key with other scripts in my application and they worked fine. I double-checked with developer's console and made sure the Static Maps API is activated and the key is correct. Then i removed the api key from the static image link request 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
.
Regenerating the api key didn't work. Removing the key or using a key from a different account with the same settings in developer's console solves the problem, but i need it to be under this account for billing purposes
TLDR; My application suddenly works only without API key or with a key from another google developer account with the exact same settings. What may be causing the problem with this particular account?
Upvotes: 4
Views: 7909
Reputation: 31
I fixed,
In the console say to add a link in this format:
*.example.com/*
I changed to this:
*example.com/*
And it worked!
Upvotes: 0
Reputation: 373
I guess it was some bug with my account. I disabled and deleted all APIs and keys, re-enabled and re-created them and the problem was fixed.
Upvotes: 2