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. 

Please note that in order to make the API key work correctly, you need to follow all the steps described n the article - from Enabling Billing to Enabling required APIs.

In this article:

  1. Enabling Billing
  2. Creating API key
  3. Restricting API key
  4. Enabling required APIs

Enabling Billing

1. First go to Google Maps Platform and click on Get Started:


2. If it is the first time you use Google Developers Console, once you enter using your Google account, you'll need to enable Billing for your project. Please note that enabling billing is a required step. Unfortunately, you won't be able to use your API key in the widget, unless billing is not enabled. 

To do it, first, you'll need to fill in the personal information Google asks you to:

Please keep in mind that Google won't charge you after creating a billing account: after accepting the terms you automatically start a 12-month trial with a $200 positive balance as a free credit per month. Inserting your credit card information is Google's requirement: you won't be able to use your API key unless you do it. 

Select the country, tick the Terms of Service checkbox and click Continue:

Enter your phone number and click on Send Code:

Enter the verification code you receive from Google and click on Verify:

Then fill in your personal information -  company's name, address and credit card details, and click Start my Free Trial:

Then proceed to the billing verification and after that start your free trial:

If you are already using Google Cloud Platform, you'll need to add your billing information on this page. To do it, please click on Create Account:

Creating an API key

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:

Restricting your API key

6. After that, you'll need to 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, please add two items -   *.elfsight.com/* and your domain name in the following format:

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

7. To use our Google Maps widget you'll need to enable three APIs: Maps JavaScript API, Geocoding API, Directions API. To do it go to Dashboard-> Enable APIs and Services -> Maps:

Enable Maps JavaScript, Geocoding and Directions APIs:

You're all set! Now you can copy and paste your API key and enjoy using our Google Maps widget!


Didn't find the answer you were looking for? Contact our Support Team. We're here to assist!

Did this article answer your question? Share your feedback: Thanks for sharing your feedback. It helps us grow! There was a problem submitting your feedback. Please try again later.

Still looking for assistance? Contact Us Contact Us