Maps API keys for geocoding not working anymore? - google-maps

It seems that the generated keys in the Google API's console are not working anymore. With different keys (tried it with both server and browser key, however the server key is what I need), generated from different accounts I get constantly the following errors:
Error when using server key:
{
"error_message" : "This site or IP is not authorized to use this API key.",
"results" : [],
"status" : "REQUEST_DENIED"
}
Error when using browser key:
{
"error_message" : "The provided API key is expired.",
"results" : [],
"status" : "REQUEST_DENIED"
}
And these are the enabled services on this account/project: http://upload.uprise.nl/et2j
This is the URL I'm trying: https://maps.googleapis.com/maps/api/geocode/json?address=900+Maple+Avenue%2C+L7S+2J8+Burlington+%28Ontario%29%2C+Canada&oe=utf8&sensor=false&key=mykey
Without the key it is working until I reach my daily limit (which causes the OVER_QUERY_LIMIT status).
Are more people experiencing this?

I have faced same issue... But finally got resolved. Google place services will take 10 minutes to make the services available for new API KEY created. Services will stat working after 10 minutes, till then we get error as "The provided API key is expired."

Geocoding is not one of the services available through the developer console at this time, which is why the key does not work (note that geolocation is not the same as geocoding).
Currently you'd need to use client side geocoding (for example in the JS Maps API) -- or purchase more server side geocoding with a maps for business license in order to increase this quota.
The fact it says the key is expired is misleading, and I'll file a bug for that.
EDIT/UPDATE: The geocoding service is now available through the developer console.

Enable
Google Places API Web Service from google console. It's work for me.

If you're switching from the free API services to a Maps API for Business implementation, you must remove the key parameter from your requests. Google Maps API web services will deny requests made with both a client ID and a key.
https://developers.google.com/maps/documentation/business/webservices/

For me Services has started working after 7 minutes.

Related

How to use google directions api for free

I was using Google Directions Api within the limit of 2500 route queries per day which is free. It was working fine. Now out of nowhere it gives this error while requesting the api when it is clearly written in https://developers.google.com/maps/documentation/directions/start
that Client Id is for premium plan.
Downloaded URL: { "error_message" : "You must enable Billing on the Google Cloud Projectassociated to this client ID, at https://console.cloud.google.com/project/_/billing/enable.Learn more at https://developers.google.com/maps/premium/new-plan-migration", "routes" : [], "status" : "REQUEST_DENIED"}
Background task data { "error_message" : "You must enable Billing on the Google Cloud Projectassociated to this client ID, at https://console.cloud.google.com/project/_/billing/enable.Learn more at https://developers.google.com/maps/premium/new-plan-migration", "routes" : [], "status" : "REQUEST_DENIED"}
How can I solve this issue
From the google maps documentation:
Reminder: To use the Directions API, you must include an API key with all API requests and you must enable billing on each of your projects.
I know they used to allow using the API without a key or billing enabled but they changed their policy a while back.
If you are willing to use an alternative to google maps you can look into OSRM (Open Source Routing Machine), this is completely free but requires some setup and you have to host it yourself. We use OSRM for directions and get much better performance hosting it ourselves for a fraction of the cost of googlemaps.

Restricted Google API key is not working in Reverse Geocoding

I have develop an iPhone Application that have Google Api https://maps.googleapis.com/maps/api/geocode/json?latlng=%f,%f&key=API_KEY
if I have use Public apikey then its working fine but when I generate ristricted api key from google concole then api is not working and give error
{
"error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 27.109.**.**, with empty referer",
"results" : [],
"status" : "REQUEST_DENIED"
}
I have added valid bundle Id when I generate restricted Api key.
please give me solution Thanks in advance.
You are calling a web service (Geocoding API). Please note that web services support only IP address restriction. The iOS app restriction is not valid for web services, it works only with Google Maps SDK for iOS. You can find information about restrictions supported by each API in this document:
https://developers.google.com/maps/faq#keysystem
In order to use a restricted API key with Geocoding API from iOS app you will need to create your own intermediate server and execute calls to Google from your server. In this case you can protect an API key with IP address of your server. The app will request information from your server and you server will call Google and pass back results.

Google maps GeoLocation API key isn't linking to my Google Developer account

I've looked everywhere to a solution for this, and I guess I've missed something obvious:
My web application (Civicrm 4.6.17) allows me to insert a Google GeoLocation API key for it's mapping and GeoLocation services. I've gone through the process described by Google GeoCoding Developer's guide:
setup a project,
got an API key,
Linked that key to my domain(s)
Even enabled billing for Pay as you go in case of over-limits.
Each step appeared to be successful. We have a project, we have an API key, we have billing enabled for it... all of this is reflected in the Google developer's console.
However, while we are processing 100s of GeoLocation requests per day, none are appearing in my project's Quota information. And we are hitting the 2,500 complementary limit.
What can I do to find out why the API key isn't linking to our Project?
Thanks for your help!
While the Google API has an unauthenticated limit of 2,500 requests per day per IP, using an API key currently gives a quota of 100,000 requests per day.
CiviCRM was not using the API key, but I've just opened an issue to address that here: CRM-18830: Google Geocoding - use SSL, restore API key.
Once that fix is merged (assuming it is), you should be able to geocode a larger number of addresses.

Google Maps API key over query limit before a single geocode has been made

My site is hosted by rackspace and I understand that is a constant problem for Google Maps API users, so I setup an API key as described in the Google Geolocation documentation here.
I tried then taking the link and directly putting it into my browser to see what was produced and this is what I got back:
URL Tested where XXXXXX is the API Key:
https://maps.google.com/maps/api/geocode/json?address=3750+Barranca+Pkwy+Irvine%2C+CA+92606&sensor=false&region=US&key=XXXXXX
Yields this message:
"error_message" : "The provided API key is invalid.",
"results" : [],
"status" : "REQUEST_DENIED"
I am using Codeigniter and Biostall's Google v3 Api to get the maps to work. However, even with the key in place, I still get the "OVER_QUERY_LIMIT" error.
Is there some kind of activation time I have to wait for Google API keys to be made active or some reason why Google would not recognize I'm not using the IP's count of map reads, but I should be on my own count? Will it even work like that?
Please help, I am not seeing a solution online and the Google support puts me here.
Thank you in advance!
The Google Geocoding API requires no key Documentation for non business users.
The API limits non business users to 2,500 requests per day.(No key)
And business users to 100,000 requests per day.(Business key required)
I assume the key you entered is This

Access Denied when attempting to use Google Maps Geocoding Service with a Console API Key

UPDATE: In an effort to give a more clear question. How do I use the Google Console API key with the Google Maps Geocoding Web Service API? At the moment the request comes back as denied, when I specify the key but even though it failed it is logged in the Google Console API site's reports section.
Original Question
I have an existing app that has been modified to start geocoding address at the time they are entered (for use within the app on a Google Map). The volume expected for this is expcted to be within the free offering's limites and does not require a key at this time. However now I have to geocode all of the existing addresses. I have a small windows app (C#) that will loop through them one at a time, request they be geocoded (via https://maps.googleapis.com/maps/api/geocode/json) and store the results in the database. However I keep running into the query limit. To help alleviate this I've setup an account on Google API Console (https://code.google.com/apis/console/) so that I get go over the limit and just be billed for the overages.
The problem is in order to do utilize this billing alternative I have to provide a Console API Key to the request, but every time I do so I get a response back with a status of REQUEST_DENIED.
My URL looks like this
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA+94043&sensor=false&key=123abc
If I take off the key it works fine, but with it on it fails. Now, I have seen other questions similar to this when looking around but can find no answer to the issue.
I've tried various alternate domains including maps.google.com, maps.googleapis.com and maps-api-ssl.google.com all seem to have the same problem from what I can tell.
Here's what I've been able to find out so far:
The service is listed in the Google Console API's site as Google Maps API v3, (there is a separate entry for v2) so I don't think it's a problem with keys no longer being mandatory in v3.
I know the requests are getting through and being correctly logged against this API key because with each failed attempt the request count goes up by one on the Reports tab of the Google APIs Console.
*I know it's not a problem with it not being accessed via a web page because the Console API explicitly lets you generates keys intended for Server/Service use and you can restrict access to them via IP address, not URL Referrer.
*I've also verified the parameter syntax as it's outlined on this page, as are other usage
*These seem to be generic to the Console API system but there is no mention of exceptions to these practices when used for the Google Maps API.
I even tried to contact Google but apparently they don't offer support over the phone (I was hoping to be done with this today but that's not looking likely).
It seems the key is not necessary anymore, since it doesn't increase your limit of free geocodings.
It was a legacy of v2, but geocoding API v2 was fully deprecated last March, 8.
If you need to use more than the free limit, I think you must adquire the Enterprise license.
Regards,
Eduardo.
I ran into this same issue and solved it by enabling the Geocoding API on the Google apis dashboard. Even though I'm using the Google Maps JavaScript API v3, it still required me to enable the Geocoding API as well. Make sure you understand the google's quota limits and billing system before enabling any API access. Hope this helps!
Late to this answer, but just in case anyone else has issue. Billing needs to be setup first and like Dylan said you also have to enable Geocoding API(this got me). At least I did for my locations app that shows multiple store location addresses.