Skip to content

Instantly share code, notes, and snippets.

@trey8611
Last active April 30, 2020 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trey8611/45caeb25771b62270d12f1c3fbb0f3f6 to your computer and use it in GitHub Desktop.
Save trey8611/45caeb25771b62270d12f1c3fbb0f3f6 to your computer and use it in GitHub Desktop.
Google API Key help

Google Geocoding

Import template

WP All Import's add-ons have a specific field that you must put your Google API Key in: https://d.pr/i/eeum5M. If you don't already have one, here's how to get a key: https://developers.google.com/maps/documentation/geocoding/get-api-key.

Referrer restrictions

Log in at https://console.cloud.google.com, go to "APIs & Services", click "Credentials", click your API key and make sure "Application restrictions" is either set to "None" or "IP addresses (web servers, cron jobs, etc.)" with your web servers IP address added.

Geocoding API

Log in at https://console.cloud.google.com, go to "APIs & Services" on the left, click "ENABLE APIS AND SERVICES", then search for "Geocoding API" and make sure it's enabled for your key.

Testing

To test your key and make sure it's working, copy the following URL into your favorite text editor:

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY

Replace YOUR_API_KEY with your Google API key, then visit the URL in your web browser. If you see address data then you'll know it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment