Page 1 of 1

Map Life Facts - API Key Problem

Posted: 23 Oct 2021 17:04
by garethhowell
I recently change machines. I previously had Map Life Facts working on the old machine but I'm having problems getting it working again on the new one (no, I didn't export all the settings before migrating across).

I've added the API code back in, but the plugin gets a "geocoder api request denied" when I click to geocode a location. Looking at the API key itself, I have no restrictions on the APIs tht can be used, but when I try to restrict it, I can't find the geocoding API in the list of APIs. I can see the Maps Javascript API.

Has something changed at Google?

Re: Map Life Facts - API Key Problem

Posted: 23 Oct 2021 20:30
by tatewise
Gareth, I've started a new thread for this as it is unrelated to the original thread you used.

Do NOT change any of the online Google API settings.
They worked before migrating so they will continue to work with the correct API Key.

Sorry but the most likely reason for not working is that you have entered the API Key incorrectly.
I strongly suggest you migrate the settings and everything will be just fine.
See the FHUG Knowledge Base Family Historian Copy and Migration Guide and focus on the Copying Program Settings advice.

Alternatively, Copy & Paste the API Key from the Google online page.

Re: Map Life Facts - API Key Problem

Posted: 24 Oct 2021 10:08
by garethhowell
It turns out that the problem was at Google's end.

In the OP, I mentioned that I couldn't see the Geocoding API in the list of APIs. I went into the Cloud Platform and opened up the mapping App I created last year and could see that the Geocoding API was not in the list of enabled mapping APIs and that there was an "Enable APIs" button at the top. Clicking this opened another screen with the full list of APIs. I searched for geocoding and found the Geocoding API, but it was disabled.

Once I enabled it, everything worked.

Thanks for your help, Mike.

Re: Map Life Facts - API Key Problem

Posted: 24 Oct 2021 11:28
by tatewise
Gareth, I'm glad you worked that through, but wonder how that Geocoding API got disabled. Very odd!

What confused me was your statement that there were no API restrictions, which implied they were all enabled.

There should be two enabled if API Restrictions are enforced: Maps Java Script API and Geocoding API.

Re: Map Life Facts - API Key Problem

Posted: 24 Oct 2021 12:48
by garethhowell
That is the odd thing, you're right.

Inspecting the API Key itself showed that there were no restrictions. However, if you set the option to restrict and then went to select the APIs, Geocoder API was not in the list. It was disabled at a higher (lower?) level.

Sorted now, but it may catch somebody else sometime.

Gareth