Do I need to generate API key?
If you prefer OpenStreet Maps and won’t be using Google Maps, Google Autocomplete or the radius search feature in our theme there’s no need for a second Google API key. But if you do want to use these features, you’ll require an extra key.
Step 1: Create New Project
Go to Google Developer console and create new projec: click “Select Project” then “New Project”
Select a name for your API key and click “Create”
Step 2: Generate API Key
Click “APIs & Services”
Then select “Credentials” tab, click on “Create Credentials”
You’ll see generated API key. Copy and save it. You will need it later.
Step 3: Configure API Key
After generating the key, simply click on it to access its configuration options.
You need to restrict key to domain by checking “Websites” under application restriction section.
Afterward, select the “Add” option and input your domain in the correct format. Please remember to enclose your domain with asterisks (*) at both the beginning and end (after / slash). This step is crucial as it ensures access to the API key for all subdomains and subpages.
Here’s an example of the correct format (without a dot before the domain): *workscout.in/*
Step 4: Enable APIs for your project
Open menu button in top left corner, click “More Options” then scroll down to Google Maps Platform and select Overview
Click “Enable APIS”
To make sure that all required APIs are enabled head over to APIs & Services, select “Enabled” filter and check if Places API, Maps JavaScript API and Geocoding API are enabled (you should see “DISABLE” sign which means they are enabled).
Step 5: Add API Key in WorkScout Core
Go to WorkScout Core → Map Settings and paste your API key in “Google Maps API Key” field.
Step 6: Unrestricted API key for WP Job Manager
You need an unrestricted API key for geocoding when filling out job submission forms. To generate such key skip the first step in this tutorial. Instead, follow steps 2 through 3, but when you reach step 3, do not restrict the key to your domain. This key will be exclusively utilized on the backend and will not be visible to anyone.
Then add unrestricted key in Job Listings → Settings → Google Maps API Key
If you’re having issue with jobs not being displayed on map please read this article: Why I can’t see jobs on the map? →Â
Step 7: Unrestricted API key for search radius functionality
Radius search functionality requires key without domain restriction. To generate such key skip the first step in this tutorial. Instead, follow steps 2 through 3, but when you reach step 3, do not restrict the key to your domain. This key will be exclusively utilized on the backend and will not be visible to anyone.
Add unrestricted key in WorkScout Core → Map Settings → Google Maps API Key