Google Maps Connections

Google Maps Connections

Table of Contents
  1. Steps to Create a Google Maps connection
  2. Setting up a Google API Key
    1. Creating an API Key
    2. Additional Info: API Key Restrictions


To use Google Maps services for Address Auto-fill 
and Postal/Zip Code Validation, a Google Maps connection must be created using a Google API key. The steps below explain how to create the connection and obtain the API key from Google.

Steps to Create a Google Maps connection

  1. On the forms listing page, in the left pane under Setup, click Control Panel

    Forms listing page

  2. Click Google Maps Connections under Developer Space.
    Developer Space



  3. Click Add New Connection.

    Google Maps Connections


  4. On the Add New Connection popup, enter a Connection Name.

    Add New Connection

  5. Provide the Google Maps API Key - Client value.
    This key will be used to access Google Maps from the web app. 

  6. Provide the Google Maps API Key - Mobile value.
    This key will be used to access Google Maps from the Zoho Forms mobile app.
    Learn More about creating an API key

    Notes:
    1. If the Google Maps API key - Mobile is left empty, the API key provided for the client (web app), will be re-used for mobile app.
    2. To use Google Maps features in the web app, enable the Places API and Maps JavaScript API from the Google API Library. For Postal/Zip Code Validation feature, you must also enable the Geocoding APILearn More
    3. To use Google Maps features in the  Zoho Forms Mobile app, enable Places API and Geocoding API from the Google API Library. Learn More
  7. Accept the terms and conditions and privacy policy of Google, then click Create to proceed.

    Once created, connections can be viewed later by navigating to 
    Control Panel > Google Maps Connections. Options to edit and delete the connection are available. Additionally, the usage details can be viewed by clicking the  icon.

    View Google Maps Connections


Setting up a Google API Key

To use Google Maps features, a Google Maps connection must be created. This requires a Google API key. 

Below are the prerequisites
for creating an API Key:

  1. Create a Google Cloud Project.
  2. Create a Google Cloud Billing Account.
  3. Link the Billing Account with your existing Project to enable billing.
  4. Enable the required Google APIs by navigating to Google Maps Platform > APIs & Services.

    To use Google Maps features in the web app, enable the Places API and Maps JavaScript API. Additionally, the Geocoding API is required for Postal/Zip Code Validation feature. After creating the key, provide the Google Maps API Key – Client value in the Google Maps connection. Learn More

Enable Google APIs for Web App

      To use Google Maps features in the Zoho Forms Mobile app, enable the Places API and Geocoding API. After creating the key, provide the Google Maps API Key – Mobile value in the Google Maps Connection. Learn More

Enable Google APIs for Mobile App


Note:  If you have an existing Google Cloud Project and Google Cloud Billing Account, you need not create a new one. You can simply link them and proceed. 
Notes

Creating an API Key

Once the prerequisites are met, follow these steps to create an API key:
  1. Go to the Google Cloud Console.
  2. In the top-left corner, click APIs & Services.
  3. Click Credentials from the available options.

    Click Credentials
  4. Click the + Create Credentials button at the top.
  5. Choose API key from the list of options.

    Choose API Key
  6. Copy the created API Key as shown in the image below.

    API key Creation

      

Additional Info: API Key Restrictions

By default, the created API keys are unrestricted. This means they can be used by anyone from anywhere, making them insecure. It is recommended to set both Application restrictions and API restrictions to reduce security risks and prevent unauthorized use.

Application restrictions defines which websites, IP addresses, or apps can use the API key. If you want to prevent unauthorized access outside of Zoho Forms, you should configure these restrictions accordingly.


API restrictions determine which APIs can be accessed using the API key.If you want to limit access to specific APIs, you must configure these settings.

 

To configure the restrictions:

  1. Click the Edit API key link in the popup shown in the previous image. Alternatively, navigate to Google Cloud Console > APIs & Services, click Credentials,
    and click the API key you just created.
    API Key restrictions

  2. Under Application restrictions, select Websites (HTTP referrers) and add the websites to restrict the key usage.
     
    Application restrictions

    Add the domains based on your region. As you have added forms.zoho.com above for the US region, you can add forms.zoho.eu for the EU region, forms.zoho.in for the India region, and other domains as applicable. Custom domains, such as forms.zylker.com, can also be added if needed, as shown above. 

    Note : To ensure Google Maps features work seamlessly in the Zoho Forms mobile app, it is not recommended to set any Application restrictions or API restrictions on the API key used.
    Notes
  3. Under API restrictions, click Restrict key and then select APIs you want to restrict.

    API restrictions


    For example, to use the Google Maps feature Address Auto-fill in the web app, only Places API and Maps Javascript API are required. 
    Hence, API usage can be limited to these two APIs.

    Note : Only the APIs enabled for the project will be listed here. To check the list of enabled APIs, navigate to the Google Maps Platform > APIs & ServicesLearn More 
    Notes
  4. Click Save.