# Generating and Setting API Keys

## S**TEP 1: Create your first Google Cloud Console**

* Log in to the [Google Maps Platform Console](https://cloud.google.com/maps-platform/).
* Select [**Get Started**](https://console.cloud.google.com/google/maps-apis/start)**.**
* Create new project if you didn't have one.

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FAG8g36U5yWQvL9INRONO%2Fimage_2023_08_10T02_29_50_307Z.png?alt=media&#x26;token=c916b66e-716f-4f22-84bd-e4a056346ace" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2F1LOkNQQl3Q4d3hV8FMLS%2Fimage-21-1024x417.png?alt=media&#x26;token=0f0a3c10-140d-402e-bd6d-059504d7ddb3" alt=""><figcaption></figcaption></figure>

## **STEP 2: Create the Billing Account**

* Go to the [Google Cloud Platform Console](https://console.cloud.google.com/getting-started?_ga=2.11775924.1445112601.1599583344-2118790495.1599583344).
* Click the menu button and select **Billing**.
* Set up your billing account.
  * If this is your first billing account, select **Add billing account.**
  * If you already have a billing account, select **Manage billing accounts.**
* Select **Create account,** then follow the instructions to set up your next billing account.

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FtcT2SRYXEU3ipskZlXP7%2Fimage-10-1024x623.png?alt=media&#x26;token=659a6d7f-31d2-4e31-9564-bbf35cee3fa4" alt=""><figcaption></figcaption></figure>

<mark style="background-color:red;">Don't worry about the cost when using Google Maps service,, currently Google Map has free caps for each plan, only when you exceed these caps, you have to pay (</mark><mark style="background-color:red;">**about 10k maploads**</mark><mark style="background-color:red;">):</mark>

| **API**                        | **Free Tier/Month** | **Overage Cost (USD/1,000 requests)** | **Plan**   |
| ------------------------------ | ------------------- | ------------------------------------- | ---------- |
| **Geocoding API**              | 10,000 requests     | $5.00                                 | Essentials |
| **Geolocation API**            | 10,000 requests     | $5.00                                 | Essentials |
| **Maps JavaScript API**        | 10,000 requests     | $7.00                                 | Essentials |
| **Places API - Autocomplete**  | 10,000 requests     | $2.83                                 | Essentials |
| **Places API - Place Details** | 10,000 requests     | $5.00                                 | Essentials |
| **Places API - Nearby Search** | 5,000 requests      | $32.00                                | Pro        |
| **Street View Static API**     | 10,000 requests     | $7.00                                 | Essentials |

## STEP 3: Enable 5 Google Map APIs

Please follow the below steps :&#x20;

* Go to **API & Services** > **Library** and choose **Maps** category

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FeEXYGDr15XbLY1JMAvN1%2Fimage_2023_08_10T02_46_49_728Z.png?alt=media&#x26;token=018c2d0c-dac1-47e0-96e5-e41d8c8df811" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FBnR6fDISkqb9MO5b9sD8%2Fimage_2023_08_10T02_48_47_287Z.png?alt=media&#x26;token=14f71534-b678-408d-88d7-7b2606adb229" alt=""><figcaption></figcaption></figure>

* Search for:&#x20;
  * <mark style="background-color:blue;">**Geocoding API**</mark><mark style="background-color:blue;">,</mark>
  * <mark style="background-color:blue;">**Geolocation API**</mark>
  * <mark style="background-color:blue;">**Maps JavaScript API**</mark>
  * <mark style="background-color:blue;">**Places API (Old version)**</mark>
  * <mark style="background-color:blue;">**Street View Static API**</mark> <br>
* Click to each and **Enable** it.**​​**

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2F7nFFTOZJYNr3FRPdRGau%2Fimage_2023_08_10T02_51_43_126Z.png?alt=media&#x26;token=2d110e59-4d01-4e20-974d-f797b49f1788" alt=""><figcaption></figcaption></figure>

* **Note: In case, all APIs are enabled but the issue still remains, please try to disable and re-enable all of them.**&#x20;

## **STEP 4: Get API Access and enter it to the App**

* Select the menu button, then navigate to **APIs and services**.
* Select **Credentials**.
* Select **Create Credentials,** then select **API Key.**
* Add this API Key to the app, under **Your Google API Key**
* Select **Save.**

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FhLrMhk1YRusYnPFKzLa1%2Fimage-19-1024x452.png?alt=media&#x26;token=799e6f98-ba10-4172-a18f-a2515dc9313b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FON21X5kwdSd5u5AYj4X0%2Fimage-14.png?alt=media&#x26;token=34231778-cae4-44a3-9704-bcfc0c3fbb6d" alt=""><figcaption></figcaption></figure>

* Go to **Settings** -> **General** -> **Google map API key** -> Enter the API Key.

\****Important Note***: API keys are unique identifiers that allow you to connect to a specific service that an application program provides. Because these keys are unique to a specific user, it's important to always keep your API key safe and secure.

In case you want support from Google, you can go to the tab **Support**, read support articles, or create a case to have a conversation with Google.

Or you can go to this tab directly by the link: [**https://console.cloud.google.com/google/maps-apis/support**](https://console.cloud.google.com/google/maps-apis/support)

<figure><img src="https://3193615300-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbGA3WnXKJXk8zrgkrt%2Fuploads%2FQVnLIuVf7o5JP1sKCqWR%2Fimage-1024x474.png?alt=media&#x26;token=539b0a78-2575-4215-b51c-ea4ba550d1c5" alt=""><figcaption></figcaption></figure>

You can follow the instruction in the video below:

{% embed url="<https://youtu.be/O-o8xSacFPY>" %}
