1
votes

http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false

That url will work. However, if i include my key: http://maps.googleapis.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false&key=abc123

I get request denied (i replace abc123 with my actual key). I just requested the key a few hours ago. I also turned on the maps api v2 and v3 for my domain. Even with both on i still get request_denied. Does anyone know why it doesn't accept my api key?

3

3 Answers

3
votes

The geocoding-API doesn't require a key. Use the key only where it's needed/available(for the services listed in the API-console)

0
votes

API V3

<script type="text/javascript"
      src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&  sensor=SET_TO_TRUE_OR_FALSE">
    </script>

API V2 deprecated

0
votes

The problem there is that any request with the key needs to be over HTTPS. Trying changing to https://... and it should work.