1. How to setup Google cloud for using Maps API Keys
This article provides the details of setting up Google Cloud Platform (GCP) Account, manage Maps API keys and its usage and billing. If you are a first time user of Google Cloud Platform, please continue otherwise jump to the last section i.e. "For existing Google Cloud Platform users". If you would like to better understand the changes that Google implemented in 2018, please read my blog article to learn more.
For the first time Google Cloud Platform users
If you are new to the Google Cloud Platform, you would need the following steps to configure your GCP for Maps API Keys.
- Sign up for Google Cloud Platform and provide billing details
- Enable Maps APIs
- Create Maps API Keys and add security constraints
Sign up for Google Cloud Platform and provide billing details
As a new user to sign up for Google Cloud Platform, you would follow the below steps -
- Signup for Google Cloud Platform (https://cloud.google.com), preferably using your active Google Account so as to get receive timely alerts or other communication from Google.
- Provide billing details such as Business Name, Tax Information, Address, Credit Cards etc. Google will ask for this information based on the prevailing rules in a country/region.
- On successful signup and adding the billing information, Google will credit USD 300; it is part of an offer currently provided by Google for all new Google Cloud customers. You could use this credit for Maps API billing. It is valid for a year.
For detailed instructions please check the below video.
Enable Maps APIs
After you have signed up for Google Cloud Platform. It would enable a few APIs by default. For WalkInto tours, we only want the below-listed APIs, the rest of the APIs should be disabled.
- Street View API
For detailed instructions on enabling/disabling APIs please follow the video below. Please note while disabling APIs, you must disable the API named "Google Cloud APIs" first, otherwise, it would block disabling other APIs.
Create Maps API Keys and add security constraints
After you have enabled APIs, now is the time to create API Keys and secure those keys from unauthorized access. Here are the steps -
1. Create API Keys
An API key is a unique code which is passed by a program/website to Google while using Google's APIs. It allows Google to know who is using their APIs. The first step is to create an API Key. Depending on your usage you could create one or many keys. In WalkInto, you could associate one key with many/all tours, or you could associate a separate key with each tour. Creating multiple keys under the same project/billing account doesn't increase your free credit/quota. It just allows you to track the usage separately for each key.
2. Add Application restrictions
To restrict the access of your API keys to limited websites such as WalkInto URLs, your WalkInto profile URL, and your custom domain URLs if any. With this restriction in place, even if someone steals your Maps API key and they use it on their website, Google will deny the access. The URLs for which keys need to be enabled are listed below.
- WalkInto Tour URLs - https://walkinto.in/*
- The secure Access URL: https://secure.walkinto.in/*
- The Work Pics publisher profile https://workpics.walkinto.in/*
3. Add API restrictions
For detailed instructions on creating keys and adding the restrictions, please follow the below video.
For existing Google Cloud Platform users
If you are an existing user of Google Cloud Platform, you would need the following steps to configure your GCP for Maps API Keys.
- Create a new project in case you want to track the usage and billing separately for your WalkInto Tours related Maps API usage. Otherwise, use your existing project.
- Enable the following Maps APIs in your project. For instructions, see the video in the section "Enable Maps API" above. If you are using an existing project, you would not disable the existing in-use APIs rather you would just enable the below-listed APIs.
- Street View API
- Create Maps API Keys and add security constraints as explained in the section "Create Maps API Keys and add security constraints" above.
Refer to Googles Cloud Documentation if you have any specific query on Google Cloud and its features - https://support.google.com/googleapi