How to use Google Places API Key?
stefanocdn opened this issue · 1 comments
stefanocdn commented
Hi, I read the documentation but cannot find a way to use a Google API Key (to increase the number of requests), is there a way to do it?
I know I could add key param inside the URL
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=XXXX&sensor=false"></script>
But is that safe to embed an API Key on the client side?
kristianmandrup commented
Read the Google API docs ;)
https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
type="text/javascript"></script>
You now have to use HTTPS, to ensure it is safe and the key (and your location?) is not intercepted.