Reputation: 123
I'm trying to use the Google API geocode service as follows:
https://maps.googleapis.com/maps/api/geocode/json?&address=melbourne&key=xxx&sensor=false
The response I get is always:
{
"results" : [],
"status" : "REQUEST_DENIED"
}
I have both Google maps API v3 and Places API services enabled. I have even set up billing. I have tried deleting and recreating numerous keys - all with the same effect. I have tried the service from different networks, also with the same result.
In the reports section of the Google API dashboard I can see the number of request accumulating but the response is always Request_Denied
.
Can anyone help?
Upvotes: 12
Views: 28161
Reputation: 2006
The REQUEST_DENIED status is returned by the Places API when:
I failed to whitelist my production server's IP address.
Upvotes: 24
Reputation: 539
Only change the googleapis source like this
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script>
Upvotes: 0
Reputation: 1965
It seems intentional that the key doesn't work with simple HTTP queries for Geocoding. Google is preventing any possible repurposing of the data. See the "Usage Limits":
"The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited."
You can load the results on a map using the Javascript API as explained here.
Upvotes: 0