2
votes

I am working on android app which uses google's places autocomplete API.

When tried to hit following URL

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Vict&types=geocode&sensor=false&language=en&key=apiKey

I got the response as below.

{ "predictions" : [], "status" : "REQUEST_DENIED" }

I got the API key from link below Google APIs console

also i have enabled Google Maps API v3 service. As per API documentation REQUEST_DENIED response is generally due to lack of sensor parameter but which i have already provided. After hitting above URL directly in browser also i am getting REQUEST_DENIED response. Is anything else i have to do?

4

4 Answers

4
votes

Are you sure your key is correct and that you have enough quota left? Try generating a new key and checking that you have the referrals correct/set to empty.

You also may need to wait up to 5 minutes for the key to become active.

FWIW I tested your URL with my own key and it worked fine.

2
votes

I was also facing the same issue "REQUEST_DENIED" when using google places API for my android app. As per Google API console help "Android and iOS keys are only supported by some APIs, such as the Google Maps Android API or the Google Maps SDK for iOS." (https://developers.google.com/console/help/).

In my case problem solved by using the 'key for bowser apps' instead of using android/iOs keys.

0
votes

I dont see input parameter listed on API page http://code.google.com/apis/maps/documentation/places/#PlaceSearches

What does it do? If you really need to have it, try moving it to the last item. Or just try removing it first to see if it works.

0
votes

The problem that you are facing is may be related to API_KEY.You inserted something like
letter "l" instead of capital "i". Capital i and el(l) looks same in the xcode environment.Try to insert correct letter will solve the issue.