I'm trying to get Place Details in a node.js app.
To simplified requests, I decided to use a node module called googlemaps.
Here's a sample code to get Place Details with it :
var googlemaps = require('googlemaps');
var placeId = '116465254736946820269';
var key = '##############548';
googlemaps.placeDetails(placeId, key, function(err, placeInfo){
if(placeInfo)
console.log(placeInfo);
});
My first question is : Do I use Browser API key, or Server API key ?
For me it's more logic to use server API, because requests are made by node.js app server, not the client in his browser...
When I try a Server API key (any IP allowed) I have this :
{error_message: 'The provided API key is expired.', html_attributions: [], status: 'REQUEST_DENIED'}
If I regenerate it, I have the same error, or a new error :
{error_message: 'The provided API key is invalid.', html_attributions: [], status: 'REQUEST_DENIED'}
I also tried a browser API key, but it's an other error :
{error_message: 'This IP, site or mobile application is not authorized to use this API key.', html_attributions: [], status: 'REQUEST_DENIED'}
So how could I make the request ? Please help me.
Thak you.
You will have to use browser key. Important step before trying browser key is to enable Google Places API Web Service in your console.developers.google.com.