Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You must use an API key to authenticate each request to Google Maps Platform APIs error when directly entering into address bar

Tags:

api

I get an error like so:

    {
   "error_message" : "This API project is not authorized to use this API.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

whenver I run this: https://maps.googleapis.com/maps/api/geocode/json?address=Winnetka&key=AIzaSyCKyVbBzwtgkyuut7P5mxK9vcOWMygCfp0

In the sample video that I am following, he gets a result like so: enter image description here

like image 340
Ibanez1408 Avatar asked Feb 20 '19 09:02

Ibanez1408


People also ask

How do I get an API key to authenticate each request to Google Maps platform APIs?

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.

Can I use Google Maps API without API key?

API keys are required for apps and projects that use the Google Maps Platform APIs and SDKs.

Why isn't my Google Maps API 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.


2 Answers

in my case i had # in address link input=City Clinical # 89so i had to remove it

like image 144
Moode Osman Avatar answered Sep 19 '22 21:09

Moode Osman


You need an API key. Otherwise it won't work.

To get an API Key you have to go to this webpage https://cloud.google.com/maps-platform/#get-started and pick the products you need. Also select or create a project and finally you have to set up a billing account. Unfortunately it isn't for free as far as I know.

like image 27
Arif Baykara Avatar answered Sep 16 '22 21:09

Arif Baykara