Skip Navigation

[Resolved] Google Maps restrictions.

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 10 replies, has 2 voices.

Last updated by Stephen Vaughan 3 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2030021

Hi,

I am setting up the Google Maps credential for the API on Google Cloud Platforms. It's been a while since I did this.

My understanding is that for security reasons one should restrict to the web address of the site but when I do this and click the check API button I get the following warning:

REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.

If I set restrictions to none everything works fine.

I am adding the address in the following format:

*.bikefriendlyhospitality.ie/*

Maybe that is incorrect.

#2030195

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

Thank you for getting in touch.

I'm assuming here that the API key would work in there wasn't any domain restrictions. If you have not tested this then you can go ahead and remove the API domain restriction and let me know if you are able to successfully validate with the API without the domain restriction.

If it works then I would recommend going through the document below for the acceptable formats.
hidden link

I would recommend just adding your URL like this hidden link

Thanks,
Shane

#2030713
Screenshot 2021-04-23 at 10.02.03.png
Screenshot 2021-04-23 at 10.01.45.png

Hi Shane,

I followed your suggestion and used hidden link under HTTP referrers. And following the instructions from the documentation I set up all the variants as you can see in the image uploaded.

Looking at another site that I set up previously MacGabhainn's hostel the following works with the Divi Map Module so I am not sure why this isn't working with Toolset?.

I did wait 5 minutes, as suggested above the Save button on cloud platform settings page.

The only option is to use no restrictions but that isn't secure.

#2030923

It seems to have started working for some reason. Perhaps it was one of many clicks on things on the Cloud Platform site that corrected the issue but for the life of me I couldn't tell you what that was.

#2031175

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

Happy to see that it is now working. It could be that it was caching or something of sort. I cannot give a clear answer on what happened here given that I'm not able to debug. However it could be caching with the URL being sent to verify on the API.

However if there are any issues please let me know.

Thanks,
Shane

#2031681

Hi Shane,

After a good night's sleep and reviewing the issue I was experiencing, I see that even if the following is displayed the maps still work.

REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.

So the trick is to set up in Google Cloud Platform without referrers, click Check API, confirm it works and then set the referrers.

Can I make a suggestion that the display of this message be changed as it is disconcerting and suggests that the maps will not work. I spent too much time experimenting with this.

Also thanks to the suggestion you posted last week for someone else regarding Divi and turning off Enqueue Google Maps Script is settings to get the Map Block working.

#2034323

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

HI Stephen,

Happy to see that this is now working for you.

Can I make a suggestion that the display of this message be changed as it is disconcerting and suggests that the maps will not work. I spent too much time experimenting with this.

Suggestion taken, however this could be a one off case as i've handled ticket previously where the URL wasn't validating and after checking their API settings and their URL format they were able to get the validation success message.

I'm unsure of the cause it your case, however based on your response the API is working correctly. Can you also confirm that on the page that the map is being displayed that there is no Notice in the Javascript console for chrome regarding the Google Maps API ?

Thanks,
Shane

#2034353

Hi Shane,

The maps are loading fine and the only warnings I am seeing in Console are the following:

DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

No mention of anything Toolset, only the Divi framework and map.js relevant to another type of map, coding possibly and not the one we use to navigate with?

I'm happy at this stage but if you need me today into this more let me know.

#2034355

Hi Shane,

The maps are loading fine and the only warnings I am seeing in Console are the following:

DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for hidden link: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

No mention of anything Toolset, only the Divi framework and map.js relevant to another type of map, coding possibly and not the one we use to navigate with?

I'm happy at this stage but if you need me to dig into this more let me know.

#2034497

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stephen,

Thank you for the update.

Given that there are no errors related to our Toolset Maps plugin then you can go ahead and mark this one as resolved.

Should any issue arise after this you are welcomed to open a new ticket and we can handle it accordingly.

Thanks,
Shane

#2035107

My issue is resolved now. Thank you!