Suppose my site is www.example.com, I have a page map.php in which i want to access places api. I have added all the credentials and also the HTTP referrer as example.com/map.php.
But its still giving me Referrer Not Allowed error.
<script src="https://maps.googleapis.com/maps/api/js?key=****&libraries=places"></script>
<script type="text/javascript">
function initialize() {
var options = {
componentRestrictions: {country: "in"}
};
var input = document.getElementById('txtcity');
new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>