Skip Navigation

[Resolved] Google maps API with referer restrictions

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is having problems using a Maps API key with URL referrer restrictions.

Solution:
This seems to affect a fairly small percentage of our users for reasons that are not entirely known.

In Toolset Maps 1.5 we have added support for a second API key for server requests. Please update the Toolset Maps plugin.

50% of people find this useful.

This support ticket is created 6 years, 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 3 voices.

Last updated by robbieL 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#888100

I am trying to:
Add the google maps API and show a map.
I created a Google map API recording to your guidelines and added:

Geocoding API
Maps JavaScript API
Places API

Without URL restrictions it works fine, but than I added:

hidden link
hidden link
hidden link

Link to a page where the issue can be seen:
hidden link

I expected to see:
When I click Check API I want to see API seems to be OK.

Instead, I got:
REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.
And the markers will not be displayed.

What can I do to resolve this Problem?

Regards
Ben

#888133

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Benjamin

I don't think it is expected/intended to specify the protocol when adding the URL referrer restrictions, which should be as generic as possible, e.g. *.wuuzilla.at/*

If you find that still does not work then, currently, there is no alternative but to not use any referrer restrictions.

We are working on a solution to this.

Our experience with the API for server requests is that they appear to be handled inconsistently, or, at least, from our perspective they are, as we are unable to identify the reason it does not work in a few isolated cases but does in 99% of them.

So we are going to add a two-key solution for such cases, with a key that includes URL referrer restrictions for the client-based requests we make, and an unrestricted key for the server-based requests we make (where the key is not exposed).

I don't have an ETA for it but it is currently in development.

#888215

Hi Nigel,

thanks for the reply. I added *.wuuzilla.at/* to the referrer url and it's not working.
Last thing I try it with the referrer ID of the server.

And if that's not working too I'll be waiting for the update which fixes the issue.

Could there be a problem with 1und1 Servers or multisite installations?

Regards
Ben

#888328

I tested the IP referer.

Your Check API Button says "Google API seems to be configured properly." but the may will remain grey with a error notice.

So I guess I'll be waiting for your Update, which will be release soon I hope.

Regards
Ben

#910879

I am having this problem, also. It has worked fine in the past. Not sure when it stopped working. I tried making a new API key and also tried the suggestion above to not have https:// in the referrer. Still not working.
Any word on when an update will come out?

#910956

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The new version is just completing QA testing and should be out next week.

#911282

Great! Thanks. I'll look forward to it.

#922971

Any word on this? Been over a month.

"The new version is just completing QA testing and should be out next week."