0% found this document useful (0 votes)
7 views5 pages

Custom Key Instructions

This document provides a step-by-step guide on how to create and link a Google Maps API key to your account, including setting up a billing account for the free $200 USD credit. It emphasizes the importance of managing billing responsibilities and offers tips to avoid exceeding the free tier, such as setting daily quotas and budget alerts. Users are advised to restrict their API key usage to ensure security and monitor their usage regularly to stay within the free tier limits.

Uploaded by

hdurriewala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

Custom Key Instructions

This document provides a step-by-step guide on how to create and link a Google Maps API key to your account, including setting up a billing account for the free $200 USD credit. It emphasizes the importance of managing billing responsibilities and offers tips to avoid exceeding the free tier, such as setting daily quotas and budget alerts. Users are advised to restrict their API key usage to ensure security and monitor their usage regularly to stay within the free tier limits.

Uploaded by

hdurriewala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

How to create and link a Google Maps API key to your account

Disclaimer: Google requires you to create a billing account in order to get the free $200 USD
credit per month. It is essentially impossible to exceed this limit on your own so it is unlikely you
will ever get billed.

There will be steps shown at the end of this tutorial that will help prevent ever going over the
free tier, but ultimately if you decide to use your own API key, the responsibility of managing
your billing is on you. GeoHub is not responsible for any costs you incur using your own key.

Step 1: Visit the Google Cloud API Library

Step 2: Click on “Maps JavaScript API”


Step 3: Create a new project (If you already have an existing project, you can skip this step).
Click on “Create Project” and give your project a name. Then click “Create”.

Step 4: Click “Enable” to enable the Maps JavaScript API in your new project

Step 5: You may now be asked to verify your account information and enter a payment method
Step 6: Click on the navigation menu in the top left, hover over APIs & Services until you see
the popup and then click “Credentials”.

Once on the Credentials page, click on the button “Create Credentials” and choose “API key”

Step 7: Once the key is created, click on it to go to the edit page. Here you can add a restriction
on the key so that only GeoHub can use your key. This way, if someone else gets a hold of the
API key, they will not be able to use it. Note though, that if you share the key with someone, they
can use it as their own custom key on GeoHub and it will use your credits. So only share the
key with others you trust and monitor your usage even more if multiple people are using your
key.

To restrict the key you want to first select “Websites” as your application restriction. Then you
want to add: *geohub.gg as a website restriction. Then under API restrictions, select “Restrict
key” and restrict the key to only be able to use the “Maps JavaScript API”. Lastly, click “Save”.
Step 8: Finally, you have to create your billing account. Click on the navigation menu and click
“Billing”. You should be automatically asked to set up your billing account.

After this step is complete, your key should be ready to use! If you did not already copy it, go
back to the Credentials page and copy your key. Then paste it into your account settings on
GeoHub and save your changes. Now you just have to refresh the page and all future games
will use your own API key.

Tips to help ensure you don’t go over the free limit

Tip 1: Set a daily quota

- Search for “Quotas” and click the one that says “Google Maps Platform”.
- Then in the dropdown select “Maps JavaScript API”.
- Then you want to go to the section that says “Map loads” and click the down arrow.
- This will show you a chart of how many API calls you are making with your key each day.
- At the time of writing, you get 28,500 calls per day for free. That would mean to be on
the safe side you don’t want to ever exceed 900 calls per day.
- Since you likely won’t even get near that on any given day, it would be wise to set the
“Map loads per day” quota to around 600.
- You can change it at your own discretion but 600 map loads is still 200+ games each
day!

Tip 2: Set a budget alert

- This is more of a backup in case you somehow exceed the free tier. You can set an alert
that will email you before costs get too crazy. But if you follow Tip 1 by setting an
appropriate daily quota, you should be okay. This is just another layer of safety.
- Search for “Budgets & alerts” or find it under Billing on the navigation menu.
- Create a new budget (You likely want to set it to $1 since budgets seem to only work
after the free tier is used up).
- Ensure that “Email alerts to billing admins and users” is checked.

Tip 3: Monitor your usage regularly

- You can view your current bill at any point by going to the “Billing” section on the sidebar.
- The free tier is $200 USD each month, so you want to make sure you are below that.
- It is also important to keep in mind that Billing and Quota figures are sometimes not up to
date, and can be slightly inaccurate. So if you don’t want to risk going over the free tier,
make sure to give yourself a good margin.

You might also like