Reputation: 4561
I keep receiving REQUEST_DENIED when trying to use Google Places Autocomplete for iOS.
The example link is https://maps.googleapis.com/maps/api/place/autocomplete/json?input=londo&location=45.647157,25.628332&key=AIzaSyCHRmOeUQCcI_1JbcWiJ (I have ommited some of the last characters of the key)
Can anyone point me out to the good direction ? Thanks in advance.
Upvotes: 2
Views: 1159
Reputation: 4561
I found the problem: you need to enable the Google Places Web Services as well and use the server key (Funny enough, this thing is not specified in any of their docs)
Upvotes: 3
Reputation: 1
I met the same problem last week and struggled for quite a while. The way I solved the problem is to follow the Google Places API for iOS https://developers.google.com/places/ios/start. Use GMSPlacesClient
instead of JSON calls.
Upvotes: 0
Reputation: 735
Use Browser key or server key for Google Places Autocomplete API. Keep the referrer field as empty. Make sure you enable Google Places API in the developers console.
Upvotes: 1
Reputation: 16684
Directions API require not iOS key, but server key. When you'll create server key, leave text view blank, do not enter your bundle name.
Upvotes: 1