Google Maps API Key for Address block

Pau Sanchez Updated by Pau Sanchez

In order to be able to display the autocomplete functionality with the Address block, you need to use your own API key.

Bear in mind that Google Cloud will require to enable payments based on usage

For the official documentation to get the API key you can check Google's documentation:

https://developers.google.com/maps/documentation/javascript/places

  1. Enable the Place API form the API Library:

Go to https://console.cloud.google.com/apis/library

  1. Select Places API

  1. Press Enable

  1. You will be redirected to the main screen for this API

  1. Click the project drop-down and select or create the project for which you want to add an API key

    In the picture below the drop-down shows the project "test"

But if needed, once with click in the dropdown we can select "New Project"

  1. Click the menu button (navigation menu "three horizontal lines") 

and select APIs & Services > Credentials.

  1. On the Credentials page, click Create credentials

And > API key

  1. And the new API Key will be generated:
  2. Click on Restrict Key, and select Http referrers (website)

And add the domain where the bot is going to be displayed (the page where you embed the bot, or Landbot's standalone URL).

Note: the following image is an example, you must add your own domain/bot's link.

Note: You have to add to full the URL of the bot. You can find it in the Share section / Share with a link

  1. And press SAVE.
  2. Now return to the https://console.cloud.google.com/apis/library and select the Maps Javascript API:
  3. Then in the next screen press ENABLE
  4. Now you can copy this API key and paste it in the Landbot:

And press Save:

  1. Wait around 5 minutes, until the API is ready and then you can use the autocomplete feature

Troubleshooting

In case once you set up the API Key, and there is no options displayed once you type. Please check the console of your browser. It might display the reason of the error. Like this one:

How did we do?

Slack Integration Dashboard

Sendgrid Integration Dashboard

Contact