问题
I am working with the Google Places API (https://developers.google.com/places/documentation/search), and have generated a new Google API Key with 'Any IP Allowed'. When I try to get the results of the API service URLs below, I am getting a REQUEST DENIED error.
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&sensor=false&key=AIzaSyA3vtFM8AMlIO853ra82KzryBs752VIWts
https://maps.googleapis.com/maps/api/place/search/xml?key=AIzaSyA3vtFM8AMlIO853ra82KzryBs752VIWts&location=-33.8670522,151.1957362&radius=1000&sensor=false
I have tried all combinations of the request parameters, but nothing has worked.
回答1:
You must also activate the places-service in the API-console.
回答2:
Please follow the Authentication instructions on the Places API Documentation getting started page to activate the Places API Web Service for your APIs Console Key.
来源:https://stackoverflow.com/questions/12301269/new-google-api-key-google-maps-api-v3-doesnt-work-for-google-places-api