How to get Google API Key for Google Maps widget
Starting using our Google Maps widget you might have stumbled over the request to add your Google API Key. In this article we're going to tell you how to create (which will take you only a couple of minutes!) and finally start using our Google Maps widget.
In this article:
Creating API key
1. First go to Google Maps Platform and click on Get Started:
2. Fill in your personal information and create a billing account, providing your credit/debit card information.
If you are already using Google Cloud Platform, you'll need to add you billing information on this page:
3. Create a new project or choose an existing one:
If you're creating a new project, insert its name, select the organization and its location:
4. Go to APIs and Services -> Credentials. That's the page where all your API keys will be stored:
5. Choose Create Credentials -> API Key
You'll see this window as soon your API key is created:
That's it, your API key is ready to use! Now you'll be able to access it in API & Services -> Credentials:
Restricting your API key
6. Restrict your API key. You can either limit the websites (HTTP referrers), web servers (IP addresses) or mobile apps which can use it. You might want to make your API key accessible for your own domain and Elfsight apps only. In this case add two items - *.elfsight.com/* and your domain name:
Please keep in mind that you need to change the way a referrer's inserted depending on the URLs which will use the key. Please pay attention to the instruction on the left of the page:
You can do the same thing with IP addresses, mobile apps and even specify the APIs your API key can call.
Enabling required APIs
You're all set! Now you can copy and paste your API key and enjoy using our Google Maps widget!