How to get Google Maps JavaScript API key?

While we are working on a Joomla map module that will require Google Map API key, I will create a tutorial on how to enable and generate an API key for your website. You will be able to use this key only on one domain, but if you want to enable the module on multiple website, you can always generate a new API key.

In this tutorial you will learn:

  • How to create a new project in Google Developers Console
  • How to enable the Google Map API
  • How to get a new API key

Creating a new project

In order to grab an API key, you need to create a project. Go to add a name to your project and hit the “Create Project” button.

create new developers project

Enable the Google Map API

Once your project is created, click on the project name and access your newly create project. Go to APIs & auth menu in the left hand side of the page, and in the APIs menu look for the Google Maps JavaScript API link.

By clicking on this link, it will redirect you to a new page, where you can Enable the API. Just simply click on the button to activate it.

enable google maps javascript api

Create a new API key

After activating the API, go to the Credentials menu and click on Add Credentials > API key:

add credentials api key

A pop-up window will ask what kind of API you want to create. Click on the Browser key button.

create new browser key

Once clicked, you will need to insert your domain name on which you want to use the API. This is an important step, because you don’t want everyone to use your API. Insert your domain(s) and hit the “Create” button.

enable api key on specific domain

Now you will be redirected to Credentials page again, where you can grab your new API key.

grab the api key

Grab the API key and save it for later use. You can always go back to your project later and get the API key or create a new one, or even delete your existing keys.


This article has 2 comments

  1. Luiz Marques Reply

    Great post. I was stuck trying to get the API key. Even though I had already read many instructions on Google, I was always driven to use their PaaS, which was not my intention at all.
    But turning point was your publishing images step by step, which let me figure out I was using a Google account with not enough privileges. As soon as I used another account, everything went right.

    Many thanks for this help!

  2. kanaram choudhary Reply

    I’m learning to make new websites
    Google Map API is how would

Leave a Comment

Your email address will not be published. Required fields are marked *