The instructions for v.3 of the Google Maps API say that I
should load the Maps API using an API key
Curiously it says I should..., rather than I must..... Anyhow, at the moment, I am not using an API key simply because (as far as I can remember) there was no mention of an API key when I was writing the code that calls this API.
Should I go back and add an API key to the URL that loads the API? It seems to work fine without the key, so I don't have any particular incentive to do this.
You're actually required to not have a key if you're a business user. Here's a quote from Google:
Google Maps API for Business developers must not include a key in their requests. Please refer to Loading the Google Maps JavaScript API for Business-specific instructions.
Normal users, however, will be fine with or without a key, although Google recommends having a key so you can monitor the API usage. Here is a quote verifying this:
The Google Maps JavaScript API V3 does not require a key, but there are benefits to using one.
You only need a key if you want to use the API management console to restrict access, collect usage statistics, etc. So, a key is recommended but not required.
See Obtaining an API key
In Api version 2 a key is required to run gmap out of localhost
in the API v3 a key is not required
Related
I've started getting this error from a Google Maps widget within a CMS I use:
This API key is not authorized to use this service or API. Places API error: ApiTargetBlockedMapError
The error message provides a helpful link to this page, which includes the following text:
ApiTargetBlockedMapError Error
The Maps JavaScript API has not been authorized for the used API key.
Please check the API restrictions settings of your API key in the
Google Cloud Platform Console.
See API keys in the Google Cloud Platform Console. For more
information, see Using API Keys.
I know Google has tweaked this API in the past, so I went to the console and checked the permissions given for the key I am using. It includes these four permissions, include the Maps JavaScript API permission:
Geocoding API
Maps Embed API
Maps JavaScript API
Maps Static API
The only part not working is the address auto-complete. When I change to Don't Restrict Key mode so the key works with all services, it works fine. Any idea which service checkbox I might be missing? I'm wondering if Google is just displaying the wrong error.
Any ideas?
This is what I did. Updated.
Make sure you have enabled all the next Google Maps Services
If you have key restrictions, make sure you add the services like the next image..
Restart the project. It worked.
It turns out that Google has tweaked their permissions settings without updating the error. I had to give access to the Places API as well for the autocomplete to function.
I've submitted a PR to the CMS widget's documentation:
https://github.com/Frojd/wagtail-geo-widget/pull/59/files
I want to add an address autocomplete to a native android app. I read that there is an option that requires API key and have a limit and another one that doesn't require an API key and have no limit (Google maps javascript api v3?).
Is there an example for the latter? I only found non-native examples and couldn't understand how to convert them into a native one.
Is it even recommended to do it or the API key required method is more recommended?
The example here: https://developers.google.com/places/training/autocomplete-android shows the api key as part of the app itself but a later note says it should be done on the server and proxied to the app... I'm confused, how should I do it then?
I'm having some issues understanding the differences between an API Key and a Developer's Key when it comes to utilizing the YouTube API.
My application is using the restful requests in v3 of the Youtube API and I can set an API key via the gapi.client.setApiKey() function , which I have done during development, but when I was looking at the quotas, https://groups.google.com/forum/?fromgroups=#!topic/youtube-api-gdata/e1JDQ4lqbXU, it states that they are tied to a developer key instead and that the developer key should be sent with each request. I went ahead and got one for development purposes, but I'm not sure how they interact with each other.
I also didn't find any details on how to send the developer's key with each restful request (such as gapi.client.youtube.channels.list), only how to include it in the header or query string when making a regular get request.
Can someone help me understand the difference between the two, how they are related, whether I need both, and how to use them in restful requests, or if I need to switch to regular get requests?
Sorry for the confusion.
"Developer keys" refer to keys that worked with v1 or v2 of the YouTube Data API. You can obtain them here. There's a separate quota system in place for v1/v2 and yes, developer keys do come into play there.
"API Keys" refer to keys that you use when making unauthenticated requests using v3 of the YouTube Data API. (If you're making an authenticated request, you don't include an API Key, since the OAuth 2 client id/secret identifies your application.) You get an API Key that you could use with YouTube from the Google APIs console, after turning on the YouTUbe Data API v3 as one of the Services you're using. Quota in v3 is tied to your API Console project, and your API Key identifies which project you're using.
The takeaway is that if you're making unauthenticated YouTube Data API v3 calls, you should only include an API Key from the Google APIs console in your request. If you're using the JavaClient library, that's done via gapi.client.setApiKey().
Is there any way to get a Google API key for local testing purposes? I intend to use some of the Google APIs mainly for educational purposes (i.e For learning about it..) and I need to generate an API key without supplying a web site URL..Thanks in advance..
P.S: If it helps I'm trying to learn about Google Translate API
As far as I know, you can supply a local host name (e.g. localhost or testserver) when generating the API key.
Q) Is there any way to get a Google API key for local testing purposes?
Ans:- There seems no way to have google maps API key free without credit card.
I have google maps api on my application and I would like to create new maps on google map from my application. I know that this can be done, but you have to login and than data is send to you account. What I would like to do is to send data to just one accout, so that my users will not need to sign in to google.
If you are referring to API keys, starting with V3 you can access the Google Maps API without a key (it's no longer required).
http://code.google.com/apis/maps/documentation/javascript/basics.html#Welcome
Note: This version of the Google Maps JavaScript API no longer needs API keys!