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.
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.
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.
I again created the following sandbox site and you can auto-login to it using the following link:
- hidden link
I've created the form which have multiple address field on that:
- hidden link
I do not see the multiple request issue I tried with my google API key as well as I tried with your google map API key. This seems to be specific to your site.
Hello Minesh,
When I open your test page, it immediately attempts to establish a connection to the Google Maps API using the search term ‘Phoenix’. It appears that this connection is being blocked (403 Forbidden). However, the old API is then automatically activated on your test page, which is not an option for us. The console displays the message ‘Classic AutocompleteService API is working - using classic API’. We would like to block this test query ‘Phoenix’ whilst still using the new API due to the improved billing.
I need to reproduce the issue on the sandbox site I shared.
What if you register your new API key to the sandbox site I shared and tell me if you able to see the issue and if you can see it then I can go ahead and report the issue in front of our Devs.
Please share any steps if I have to follow on the sandbox site I shared that should help me to reproduce the issue.