Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps V3 API Key Invalid - but my personal dev key works

I've recently been doing development upgrading our maps to v3 and during development I was using my own personal key. Everything was working fine. When it was time to go to production I had someone generate a key through the company's google account and now it doesn't work. I've sat next to them making sure they were generating a browser key, and I'm pretty sure the domains are correct under the "Referrer's" section matching both: .mydomain.com/ mydomain.com/*

I've verified that we are using Key for browser apps.

I've verified that the Google Maps API v3 is turned ON via the services panel. Everything is identical to the way I was doing it with my key. I think the only difference is that they've enabled Billing on the company account where as my key doesn't. We'd like to get this moved off of my key seeing as how it's receiving more than the 25k views/day limit on my account.

When using the company API key the map loads and then very quickly I get an alert box which reads: "Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: https://developers.google.com/maps/documentation/javascript/tutorial#api_key"

If I then replace the key with my own key, with the same referrers settings, it works..

Any help would be greatly appreciated.

like image 477
Corey Snyder Avatar asked Mar 07 '13 21:03

Corey Snyder


People also ask

Why is my Google Maps API key not working?

There are a several reasons why your google maps may not be working, the most common issue being no Google Map API key set or set incorrectly. To use the Google Maps JavaScript API, you must register your app project on the Google Cloud Platform Console and get a Google API key which you can add to your app.

How do I know my Google map API key is working?

Go to the Credentials section, which can be accessed from the left side bar under Google Maps Platform > Credentials. Check that the API key you currently use on your website is listed. If that's not the case, switch to a different project, and check the credentials there.


1 Answers

You are missing the v=3 before your key={yourkey}

Like this:

maps.googleapis.com/maps/api/js?v=3&key={your key}&sensor=false
like image 51
Mark Avatar answered Sep 20 '22 18:09

Mark