Reputation:
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.
Any help very much appreciated.
Upvotes: 0
Views: 255
Reputation: 2189
You have to Create API Key from this link & from google console make sure you have enabled Google Place API.
Upvotes: 0
Reputation: 5451
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:
Upvotes: 0
Reputation: 1038
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
Upvotes: 1