Why is the Google Places API is randomly returning "Not Authorized" errors? -


i'm getting strange results google places api.

i have following simple code:

<!doctype html> <html> <body>     <input id="pac-input" type="text" placeholder="enter location">     <script>         var initmap = function () {             var autocomplete = new google.maps.places.autocomplete(document.getelementbyid('pac-input'));         }     </script>     <script src="https://maps.googleapis.com/maps/api/js?key=[mykey]&libraries=places&callback=initmap"></script> </body> </html> 

and i'm finding work first 10 keystrokes, service returns "this api project not authorized use api." error message.

however, when run same code on plunker, works time.

here couple of screenshots localhost:

enter image description here

enter image description here

i have google maps geocoding api , google maps javascript api enabled.

what missing here?

for me enabling "google places api web service" in addition "google maps javascript api" made work.


Comments