Skip to content

Instantly share code, notes, and snippets.

@trey8611
Last active Apr 30, 2020
Embed
What would you like to do?
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