Unable to successfully get the Geolocation add-on working while the API restrictions are set to ‘website’ / referrer.
I was able to setup the address input and toggle the autocomplete option when the API was left unrestricted. Also, while the API was unrestricted the Gravity Froms Settings > Geolocation Settings would show a green tick after the API key. However, as soon as the API restrictions are added within the Google Cloud Console, the Geolocation Settings > Google Places API Key would display an .
I got in touch with Google Cloud Support, and after running some tests they said the API errors because of the referrer restrictions.
The odd thing is, although the Gravity Froms Settings > Geolocation Settings would show a red cross , the form autocompletion would still work. This leads me to thing that there might be a bug with the GF Geolocation add-on.
Here is an example of the website / referrer restrictions (I’ve tried a number of variations, which all seems to produce the same result - autocompete working, but reporting that it’s not in the WP Dashboard / GF and Form Settings.
sub.domain.com
sub.domain.com/*
*sub.domain.com/*
https://sub.domain.com/*
Gravity Form API Key (with API ‘website’ restriction)
Hi Joe. I ran into this issue when I initially set up the Geolocation Add-On. The issue was the referrer URL patterns. I followed the instructions here:
And I was able to use Geolocation again. I needed to read the instructions several times to ensure the URL pattern was correct. From the sounds of your description, you have the same issue. I recommend reviewing the Google Docs again and double checking your patterns. Thank you.
Hello,
I have installed the Geolocation Addon and having the same issue with API Key Validation despite the key being the correct.
We have added the following website restricions which should work: .example.com/ example.com/*
Result → We are asked for the Allow / Deny of Live Location but the location is still not fetching as expected.
We tried your reference as well still the issue persists.
Regards
Hello. I found your tickets. All the tickets have been combined into one and you will receive a response from us there. Please don’t create any more tickets. Thank you.