# Google Maps API Keys

### Setup

* Goto [**`https://console.cloud.google.com`**](https://console.cloud.google.com) and login with your Google Account or create an account.
* Create a Project on Google Cloud Console.
* Enable the following APIs on your project:

{% hint style="success" %}

1. &#x20;**Geocoding API**
2. &#x20;**Maps Javascript API**
3. **Places API**
4. **Maps Elevation API**
5. **Maps Static API**
6. **GeoLocation API**
7. **Distance Matrix API**
   {% endhint %}

* You will have to set up the Google Billing account as well.
* From the Left menu, goto **`API & Services >  Credentials`** and click on \`Create Credentials\`&#x20;
* Create a Key named **`HTTP Key`** and under the website restrictions tab add your website URL like the following

{% hint style="info" %}
If your website is **`my-domain.com`** add these:\
\&#xNAN;**`https://my-domain.com/*`**`and`\
**`https://www.my-domain.com/*`**

`Make sure you add`**`asterisk (*)`**` ``at the end of the URL.`&#x20;
{% endhint %}

* Create another key named **`IP Key`** and under the IP Addresses section paste your website/server IP address.

{% hint style="info" %}
Go to <https://www.ipvoid.com/find-website-ip> and find your website's IP address
{% endhint %}

### Very Important

{% hint style="danger" %}
Sometimes on a shared hosting environment, your website IP might not be enough to configure the IP restricted key. In these cases, you will be shown a popup message like:

**Geocoding failed because \`This IP, site or mobile application is not authorized to use this API Key. Request received from IP address \*.\*.\*.\* with empty referer.**

The \*.\*.\*.\* is your server's IP address which needs to be set on the IP Restricted key. Go back to the Google Cloud Console and set this IP Address provided on the popup.
{% endhint %}

* Save all the changes and login to your Foodomaa's Admin Panel.
* Goto **`Admin > Settings > Google Maps`** and paste your both keys here.

{% hint style="info" %}
**Google API's takes 5-10 minutes to reflect the changes on your website.**
{% endhint %}

### Important Links

1. <https://console.cloud.google.com>
2. <https://cloud.google.com/maps-platform>
3. <https://www.ipvoid.com/find-website-ip>

### Video Walkthrough

{% embed url="<https://www.youtube.com/embed/Bg4kFL-oxuE>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foodomaa.com/configurations/google-maps-api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
