Weird API keys being used for geolocation queries
See original GitHub issueIn the geolocation demo https://tomchentw.github.io/react-google-maps/basics/geolocation the API key defined in the app is: AIzaSyC4R6AN7SmujjPUIGKdyao2Kqitzr1kiRg
However, the actual requests are sent with a different keys, depending on the browser:
Chrome: AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw
Firefox: AIzaSyD_Drzahe4dBzGCZ9ArvowCvrPx_yFrlCM
, e.g.:
POST /geolocation/v1/geolocate?key=AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw
If I understand correctly, these are some kind of generic browser keys, however, the problem is that they hit the daily usage limits in the in the later hours of the day.
How can I force the library to use my own key for the geolocation requests?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
How to get geolocation api keys without anything
I am currently looking into the geolocation API from google/mozillas MLS geolocation. I am unable to enter any payment information for google ...
Read more >Use API Keys with Geolocation API - Google Developers
Restricting API keys · Go to the Google Maps Platform > Credentials page. Go to the Credentials page · Select the API key...
Read more >Security best practices - Algolia
Learn about API keys, ACL, HTTP requests, and security policies you need to know to ensure the security of your data hosted by...
Read more >Cloudflare API v4 Documentation
Example: a Cloudflare Certified Hosting Partner may use APIs to toggle basic security ... To purge files with ${geo} or ${devicetype} in their...
Read more >Securely using API keys in Postman
Sending an API key in the query string as part of the URL is a common practice. Go to the NASA API portal,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see what you’re saying, I’ll let others comment but as far as I can tell the library is just using the HTML5 geolocation API to find your location, from there its just a matter of using the google maps library to center or place a marker at that location. There’s no explicit calls out to /geolocation/v1/etc. The browser might be doing that internally in how it works, but iirc there’s no way to configure this.
I could be wrong, leaving this open to see if anyone else has come across this.
@oshalygin I’m afraid you did not understand my point. Whichever key I am using, the geolocation requests are always fired with the keys I mentioned. You can reproduce it even on the Google Developer’s site: https://developers.google.com/maps/documentation/javascript/examples/map-geolocation The request that is being sent to the api:
POST /geolocation/v1/geolocate?key=AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw HTTP/1.1