How can I reactivate the Google API key? - google-maps

We've been sending addresses to Google for a while and then getting the coordinates from Google back and storing them.
This won´t work anymore.
From Google, we get the following error message:
You must use an API key to authenticate each request to
Google Maps Platform APIs. For additional information, please refer to
http://g.co/dev/maps-no-account
What must I change in the API settings, so it works again?

Welcome to the community!
You need to add a Billing Account, Maps API is not for free anymore.
https://cloud.google.com/maps-platform/

Related

Google map API key credential additional methods

I have received a Google Map API Key and it seems to work just fine. Looking on the credential page of the GCP I see there are some alternate methods that I don't see documented anywhere. I have attached a screen shot of the specific page I am referring to, but I was wondering if anyone could give me insight on how to use these methods (OAuth and Service Accounts) or where I might find more documentation.
Thank you.
OAuth 2.0 Client IDs and Service Accounts may not be needed for Google Maps APIs. You will only need API keys to authenticate Google Maps APIs requests as explained here, so I think you can ignore the others.
But to give you an insights, as per the documentation here:
OAuths 2.0 Client IDs are used to allow your apps to access other Google Cloud products on behalf of the user.
Service Accounts are accounts that used by an app to make authorized API calls for other Google Cloud products. You can learn more here: https://cloud.google.com/iam/docs/service-accounts

Which Google Maps API to enable to get http get to work

I want to use this get in order to get Lat/Long for an address.
Currently, it always returns REQUEST_DENIED. This API project is not authorized to use this API.
I have ensured that my key is enabled, and currently, it has no restrictions for testing purposes. This is the url, with the actual key replaced with 12345.
https://maps.googleapis.com/maps/api/geocode/xml?address=123%2C%20Harbor%2C%20Woods%20Circle%2C%20Safety%2C%20Harbor%2C%20FLCA%2C%2034695&key=12345
I have tried Disabling the Google Maps API, and then Enabling it again, but I still get the same error message.
I am thinking that maybe I don't have the right API enabled on this, as it should be working.
To use the Geocoding Web Service you need to enable it in the Google API Console
I just found it, I needed to enable the Geocoding API.

Google Maps API is never satisfied

If I use URL referrer authentication with Geocoding API it says:
There was an error while trying to fix the Venues geolocation information: API keys with referer restrictions cannot be used with this API.
Which after research I find that this means that Google Maps is looking for IP address authentication.
But if I use IP address authentication with Javascript Maps API it says:
JavaScript API error: RefererNotAllowedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: https://example.com
What can be going on?
How can I fully satisfy the good ol'Google Maps?
It looks like you're using two different Maps APIs; the client-side JavaScript API and the server-side Geocoding API web service. This means you need 2 API keys; one restricted with HTTP referrers for client-side use, and the other one restricted by IP address for web services only.
To learn more on how API key restrictions work check out Google's documentation on API key best practices.
Hope this helps!
I know this is 3 months old now. But I had the same problem and I found out how to solve this.
As evan said, you need 2 API Keys. And annoyingly, The Events Calendar only have one field for the API Key.
BUT, I found a link here: https://support.theeventscalendar.com/ to https://support.theeventscalendar.com/716190-Using-Google-Maps-API-Key-Restrictions. The page redirects though... But I managed to screen shot parts of it before it redirects and found this snippet: https://gist.github.com/cliffordp/a2ec320313afbc1ffb5f0e5ac654b7fb
(I changed the code to use a define instead because I don't want my API key in git)
This filter will make it possible to have two API KEYS.

Is there possibility for registering URLs or domains in Google Maps API?

Is there a way to register Authorized URLs in Google Maps via an API?
Currently, I am manually adding URLs through the Google Maps Support portal, but I would like to be able to make an API call when a customer submits a new domain to my service.
Unfortunately, currently there is no way to manage API key restrictions programatically.
There is a feature request in Google issue tracker to make it possible:
https://issuetracker.google.com/issues/35829646
Please star this feature request to add your vote and subscribe to notifications, at the moment it has only 6 stars, not enough to increase its visibility.
Update from Google
The best way to handle thousands of authorized domains is to use an API to programmatically manage your API Keys and their restrictions, and we have recently launched a new service that allows you to do this.
This API is still in Alpha. If you are interested in becoming a Trusted Tester for this service, you can use the following form to sign up, please read the instructions carefully:
https://forms.gle/qx2SMcarWCAsbWVp7
Please note that this API is not part of the Google Maps Platform. After you fill out the form, you will be contacted by the API Keys API team with instructions on how to get started, and how to receive support.
API Keys API is currently free of charge. However, please note that use of Cloud Endpoints may be subject to charges at high traffic volume. You can check the pricing sheet here:
https://cloud.google.com/endpoints/pricing-and-quotas

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.