Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps: "This API project is not authorized to use this API."

Recently I started coding a Google Maps service integration. I went ahead and generated an API Key associated with my business email account on bronze level. When I use the service sans API Key everything works swimmingly.

If I use the API Key parameter, with my API key generated in my developer console I get the error message:

This API project is not authorized to use this API.

The URL used to access maps is below:

https://maps.googleapis.com/maps/api/distancematrix/xml?origins={origin_address}&destinations={destination_addresses}&mode=driving&language=en-US&sensor=false&key={APIKey}

How does one get the API Key to be authorized for v3 Maps JavaScript API. I am making the call as a raw post in the ASPX code behind to that address. It seems to me this used to work fine when I first started all this, now today all of the sudden I'm getting this error.

I need this to work since I will also be using places and that service seems to only work with the API Key. I would like to be able to have the key configured once and be done with it.

like image 969
user3402838 Avatar asked Mar 10 '14 17:03

user3402838


1 Answers

You'll need to enable each API you want to use.

The maps-javascript-API is one API, the DistanceMatrix-API(Webservice) another.

Go to the developer-console->API's and enable the Distance Matrix API

Note: this is only related to the DistanceMatrix-Webservice, when you use the DistanceMatrix-Service of the Javascript-API you don't need to enable this service.

like image 93
Dr.Molle Avatar answered Oct 08 '22 00:10

Dr.Molle