-
Notifications
You must be signed in to change notification settings - Fork 8
Google Keys
Benny Born edited this page Jun 19, 2024
·
6 revisions
To use StoreLocator 3 you'll need a Google Account and register some API keys. The Google Maps API is used by StoreLocator to provide suggestions while typing into the search field and to obtain the geo coordinates for your stores.
- Navigate to the Google API Console
- In the upper bar click on
Project
and chooseCreate project
- The
Project name
is not relevant, you can name it however you want - Agree to the Terms of Service and click
Create
- On the left side click onto
Credentials
- In the upcoming window click on the button
Create credentials
and chooseAPI key
- The key shown will be used as our Server-Key. Go ahead and copy it into the Contao settings
- Click on
RESTRICT KEY
- Name it "Server Key"
- Since the Server-Key is kept secret all the time we do not necessarily need any restriction but if you know your servers IP it won't hurt to select
IP addresses
and theKey restriction
settings - Click on
Save
- Repeat steps 1-5 but this time step 3 will be our Browser-Key in Contao
- Name it "Browser Key"
- In
Key restriction
chooseHTTP referrers
- Enter the domain of your website*
If your domain is called
www.mustermann.de
you should set the HTTP referrer to*.mustermann.de/*
- Click on
Save
The following steps are needed to enable all API´s StoreLocator needs in order to work.
- On the left side click onto
Library
- In the search field enter the term
Google Places API Web Service
- Click on the first result
- In the upper bar click on the button labeled
ENABLE
- Repeat steps 1-4 for the terms
Google Maps JavaScript API
,Google Maps Embed API
,Google Maps Geocoding API
andGoogle Static Maps API
- On the left side click onto
Dashboard
- In the listing of active API's click on the entry
Maps Static API
- Choose the tab labeled
URL signing secret
- Click on the button
Allow unsigned usage
and confirm the upcoming dialogue