How to generate and restrict API keys for Google Maps Platform

Google Maps Platform · 794K views · 2019 · 4:39

Open on YouTube

Web developmentCloud, DevOps & reliabilitytutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering Google Maps API key errors, such as expired keys, referrer restrictions and IP restrictions, as a visual guide to creating and restricting keys.

Recommended by 1 people across 1 different months, 2020 to 2022.

What it is

A short official tutorial from the Google Maps Platform channel in which Emily Keller shows how to create an API key in Google Cloud and restrict it by website, IP address or app. It is part of the Getting Started with Google Maps Platform playlist.

What people said

Recommends jabamataro · 2020-05 · Stack Overflow · on “Google Maps JavaScript API error: ExpiredKeyMapError”

Based on the doc [LINK] given on the error message, you usually get ExpiredKeyMapError when the API key you are using is not recognized by the system or already expired. I suggest generating a new API key and using that new API key in your implementation instead. You can check the youtube tutorial - How to generate and restrict API keys for Google Maps Platform [this video] If the error still persists, I suggest that you file a support case [LINK] to Google Maps Support for further assistance.

Cites smga08 · 2020-05 · Stack Overflow · on “What is the endpoint URL of the Playable Locations API?”

Please do note that though it is already available in the public documentations, currently Playable locations API is not publicly launched yet . That might be one of the reasons why you are not able to use it currently. Also, in your Playable locations request, make sure that you are using your own valid API key under your Google Maps project as well as enable the Playable Locations API in your GCP console for you to be able to use this in your implementation. If you have not generated a valid API key and enabled Playable Locations API in your GCP console yet, here are guides you can check: Create an API key: [this video] Enable an API: [LINK] Also, it seems you have added the "key" parameter in

Cites smga08 · 2020-06 · Stack Overflow · on “How to use IP restrictions when using Google Direction API?”

For you to restrict your API keys with IP restrictions, you need to add your server's public facing IP address as a restriction to your API key. More information here [this video] . Once you have applied IP restrictions to your API key, only requests from your specific server(in your case your proxy server) is allowed to use your restricted API key . This means that all requests which come from different IP addresses other than the one you have set as restriction are blocked. This is the reason why you are getting an error if you tried to send a request directly from your browser using your restricted API key since your browser has a different IP address than your proxy server. To make sure that

Cites Beth · 2022-04 · Stack Overflow · on “ionic on IOS Google Maps JavaScript API error: RefererNotAllowedMapError”

The RefererNotAllowedMapError means that the current URL loading the Maps JavaScript API has not been added to the list of allowed referrers, as per Error Messages documentation ( [LINK] ). As per the error message you have shared, you can add ionic://my-domain/home/appointments-new/appointments-search-fields to your list of website restrictions for the API key you're using. The steps on how to do this can be found here: [LINK] [this video]