Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Map API key error "Your site URL to be authorized"

I have searched many links and read documents related to google api key, but every time I am getting the only error of Your site URL to be authorized

I am creating a PhoneGap hybrid application where I am not sure if which URL I have to pass to google api key referrer so I am stuck here

What I am using for google script is:

<script src="https://maps.googleapis.com/maps/api/js?v=3&key=MY_API_KEY&sensor=false" type="text/javascript"></script>

Updated

I have already created Browse Key using google console but now What I have to pass in referrer link ( ? ) while I am creating a cordova application

enter image description here

like image 681
Kirankumar Dafda Avatar asked Jun 23 '16 09:06

Kirankumar Dafda


People also ask

How do I authorize Google Maps API key?

Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.


2 Answers

I Dont know if this will help anyone but I spent a good hour trying to figure out this problem and ended up realizing I had the wrong API enabled. You need Google Maps JavaScript API enabled.Also sometimes you need to specify https.

like image 73
Mike Q Avatar answered Oct 21 '22 13:10

Mike Q


1.Leave it blank 2.You need to enable the google maps api for your project.

like image 2
Jonas Wilms Avatar answered Oct 21 '22 12:10

Jonas Wilms