0

I want to fetch places from google place api, I just download SPGooglePlacesAutocomplete & created new API Key enable place, direction & map api's from Google API Console still i am getting error alert.

enter image description here

Any help very much appreciated.

Harshal Valanda
  • 5,331
  • 26
  • 63

3 Answers3

1

I assume you are using key which is made for iOS apps.But SPGooglePlacesAutocomplete might be using Google's public API to fetch the places list. So in that case you should use key for your browser apps. You can refer following link for more elaborated ans

REQUEST_DENIED when using the Google Places API

Community
  • 1
  • 1
Codobux
  • 1,028
  • 1
  • 12
  • 15
  • Simple & short i will say update answer only & write words `Create api key from` [here](https://developers.google.com/places/web-service/get-api-key) –  Mar 29 '17 at 12:41
0

The Google Places API Web Service enforces a default limit of 1,000 free requests per 24 hour period.

The "status": "REQUEST_DENIED" is returned by the Google Places API Web Service when:

You have not activated the Google Places API Web Service in the Google API Console.

The key parameter is missing from your request. EX. https://maps.googleapis.com/maps/api/place/add/json?key=YOUR_API_KEY

The key parameter does not match the your API key in the Google API Console. Your API key has not been correctly set up in the Google API Console:

  • If you are using a browser-restricted API key, check that your allowed referer(s) are correct.

  • If you are using a server-restricted API key, check that your allowed IP(s) are correct.

  • API keys with Android or iOS restrictions are not supported. Please
    use a generic (unrestricted) API key, or a key with browser or server restrictions.

The request was not sent as an HTTPS request, HTTPS is required for all Google Places API Web Service requests.

The incorrect HTTP method was used to send the request:

  • All requests must be sent as a GET request except for Place Add.
  • All Place Add requests must be sent as a POST request.
Harshal Valanda
  • 5,331
  • 26
  • 63
  • Thank you harshal for your efforts @i have accepted Ankit answer your 3rd point that i was not aware about it. :) –  Mar 29 '17 at 12:44
  • Hi Harshal i am asking one more question on google places please answer me it seems you are master in Google place i'll accept your answer there. –  Mar 29 '17 at 12:47
0

You have to Create API Key from this link & from google console make sure you have enabled Google Place API.

Mukesh Lokare
  • 2,159
  • 26
  • 38