Skip Navigation

[Assigned] Multiple test requests for Google Maps API

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 17 replies, has 1 voice.

Last updated by yannicN 1 day, 19 hours ago.

Assisted by: Minesh.

Author
Posts
#2853664

Hello Minesh,
Thank you very much. What is the advantage of the second API key? Are the requests then sent on the server side? When exactly is this connection used? I’m curious to hear what your developers say – whether there’s a solution. The verification process results in additional unnecessary costs when using the Google API.

#2853682

Christopher Amirian
Supporter

Languages: English (English )

Hello, Minesh is off today. I will answer the question to the best of my knowledge.

2nd API key (Toolset Maps settings), what's the advantage?

It's used exclusively for server-side requests, so it's never exposed in the HTML. This lets you keep the front-end key safely restricted by HTTP referrer (domain) while still allowing server-side calls to work.

For more information:
https://toolset.com/course-lesson/creating-a-maps-api-key/

Are requests sent server-side with the 2nd key?

Yes. Toolset uses that second key for server-side calls (e.g. when it needs to geocode addresses / fetch coordinates).

When exactly is the server-side key used?

When there are Address fields whose lat/long are not yet cached in Toolset's map database, Toolset triggers Geocoding to cache them.

Does the 2nd key stop the "verification/probe" costs (autocomplete test requests)?

Not by itself. Those autocomplete requests are browser-side, so they still use your front-end key. The second key only applies to server-side requests.

Thanks.

#2853703

Dear Christopher,
Thank you very much for your feedback. That makes sense. We’ll then wait for Minesh and the feedback from the dev team.