All new created websites are required by Google to use an API key to access the Google Maps API services.

Billing

To use the Maps JavaScript API, you must enable billing. You can enable billing separately (see Usage and Billing) or when you get your API key.

How to generate API key?

To generate your API key, you need to  access the Google Developer console. In the Google Developers Console, follow these steps:


Create Project


Generate API Key

It’s important to add your website URL to ” Accept requests from these HTTP referrers” field, make sure to add it as

http://yourpage.com/*

and

https://yourpage.com/*

this way all subdomains and subpages will be accepted. Contrary to what Google suggest, you need to use http:// or https:// in front of your domain, it will not work with just *. It sometimes takes couple minutes to have your site accepted.

After adding it, click Create.

You’ll need to generate 2 API keys if you want to geocode your jobs and/or use radius based search. The 2nd key must be configured same way, but without any domain/key restrictions. This API key is used for server-side geocoding and it won’t work with domain restriction. It’s not shared anywhere publicly so don’t worry that someone else is going to use it.


Copy API Key

Copy the unrestricted API key and paste it in Job Listings -> Settings -> Google Maps API and if you want to use radius based search, copy it also to wp-admin -> WorkScout Core -> Map Options -> Google Maps API key for server side geocoding.

 

The restricted API key should go to wp-admin -> WorkScout Core -> Map Options -> Google Maps API key, if you selected Google Maps as Maps Provider.

You still have to add Google Maps API key in Job Listings -> Settings, even if you use OpenStreetMap as map provider.

Lear more about geolocation for jobs


Enable APIs

Go to Library -> Maps and click  Google Maps JavaScript API –  Enable the service.

Other APIs you need to enable to get full functionality of WorkScout are marked on this screenshot


Adding API Key

You need to add API key in two places:

  1. Job Listings → Settings → Google Maps API Key (key here is required for geocoding in job submission form)
    Related article: https://www.docs.purethemes.net/workscout/knowledge-base/why-i-cant-see-jobs-on-the-map/
  2. WorkScout Core → Settings → Google Maps API Key