Cannot get Google Maps JavaScript API Key - javascript

I am attempting to use Snazzy Maps to implement a custom Google Map iFrame into my website, however I cannot retrieve an API key from the Google Development Console. The tutorial that Google provided follows an outdated interface.
After enabling the API I have no options or indications of where the key may be, I have three tabs "Overview", "Usage" and "Quotas" but no actual key...
Any ideas?

If you're on http://console.developers.google.com/ and selected your project, you should see a sidebar on the left side of the user interface. Below the API's menu item (underneath the section: APIs & AUTH) there should be an item called Credentials.
You can obtain your API credentials over there (API Key). Hope this will help.

Related

Google Maps Javascript API Usage not showing

I recently (like 4 hours ago) added an api key and enabled billing for Google Cloud Platform so my Google Maps Javascript API wouldn't get blocked at 25,000 places autocomplete requests. I expected to see usage statistics in Google Cloud Platform immediately but still it shows zero usage activity. Am I doing something wrong?
I think you are checking the wrong API.
Try going to Google Places API Web Service : Key features include autocomplete, search, place picker, photos and add place
OR
Google Maps JavaScript API: build and style a map onto your website.
Check the usage statistic of these two API to see the request related to place autocomplete. Hope this helps

What API Key is Google using when I load the JS script

I am loading the google maps/places JS API in my web app like this in my web/Ionic mobile app.
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places,geometry"></script>
I am not providing an API key in that URL. What api key is google using? If different users use the web-app, will it use a seperate API key for each user? and therefore each user will have a limit on the requests as opposed to the entire app having the limit?
This is the angular directive using the API. It doesn't have a key defined in it.
https://github.com/kuhnza/angular-google-places-autocomplete
Thanks
What api key is google using? If different users use the web-app, will it use a seperate API key for each user?
No, Google API is not requires key. But key gives very useful information (read the link below). Key is unique for each app you use (if you register it in console). More detailed information can be found at Google Developer Console and at page: https://developers.google.com/maps/documentation/javascript/get-api-key
And therefore each user will have a limit on the requests as opposed to the entire app having the limit?
About limits in Maps Google wrote here:
https://developers.google.com/maps/documentation/javascript/usage

Using API key with google javascript directions API

I would like to be able to set the mode of travel when sending a request to the google javascript directions API i.e. train or bus. It requires an API key to be included when setting this option. I have an API key but what other settings do I need to change to make it work?
Do I need to add a specific website to the developer console?
and is the key included in the request itself or can it be included in the src part of the javascript with the maps URL? I've tried both options and it's not working.
https://developers.google.com/maps/documentation/javascript/directions?hl=en

How to make Youtube Data Search API open for public usage?

Currently, I can use Youtube Data API to search for videos. However, I must be logged in onto my google account. Is it possible to conduct searches without logging in into an arbitrary google account? This way any user can just search without logging in.
I am using Youtube api in javascript
Search is a special case, where users don't have to log in through OAuth2. But you will need to provide your API key to authorize the access uf API usage.
Here's the example. HTML and JS
You'll need an API key so that any searching done through your app can be properly analyzed, routed, etc. If you're using v3 of the data API (which you should now that it's in production), you can easily request a key as you would get access to any google API:
Visit https://code.google.com/apis/console and register your
project (don't forget to give it a project ID)
From that project dashboard, select the Youtube API under the
'Services' tab.
Since you just want to do searching, under the 'API
Access' tab you can create a browser app key (part of the 'Simple
API Access' section). That generated key should be appended to all
REST calls.
If you still need to use v2 of the API for some reason, you can create your key here:
https://code.google.com/apis/youtube/dashboard/gwt/index.html

When is a Google Maps API key required?

Recently Google changed it's policy on the use API keys. You're now supposed to no longer need an API key to place Google Maps on your website.
And this worked perfectly. But now I have this map (without API key) running on my localhost, which works fine. But as soon as I place it online, I get a popup saying that I need another API key. And on another page on that website, Google Maps does work. Could it maybe have something to do with that the map that doesn't work have a lot (30+) of markers on it?
Actually using an API key wouldn't be a very nice solution to me, as this is part of a Wordpress plugin used on many websites.
Sounds like you're running v2~ time to upgrade, or get a key for the domain you want to run it on:
Google Maps V2 API Key Request
You do not need an API Key to use Goolge Maps API V3. However, we just experienced an issue where Google reported that we had exceeded our limit, even though we didn't (Development Server). I went ahead and set up an API Key, and its actually beneficial, because you then get usage reporting. Also, we haven't seen the false Quota usage problem since then. I thought I would go ahead a share the process:
Goto https://console.developers.google.com/
Click the red 'Create Project' button
Give your project a name and Google will automatically give it an ID
Wait until the Spinny on the bottom says your project is complete.
In the left hand nav, select APIs Under APIs & Auth, and select 'Google Maps JavaScript API v3'
Click the link and then Turn on the API
Go to Credentials under the APIs & Auth section, and click the red 'Create New Key' under the Public API access section. Then click Browser Key.
Make sure you include the star in your Website's name. For example, use mywebsite.com/*. This will ensure all pages are authorized to use the API.
Copy the key into your Javascript reference to the Google Maps API, like so:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY"></script>
Long story short, the key is not required, but best practices would indicate that you should use the key.

Categories