Reputation: 405
In here maps while testing my api_id and app_code in jsfiddle for places API I am getting 401 unauthorised, despite I have recently generated new API codes.
$.ajax({
url: 'https://places.demo.api.here.com/places/v1/categories/places',
type: 'GET',
data: {
at: '41.8369,-87.684',
app_id: '{demoappid}',
app_code: '{demoappcode}'
},
beforeSend: function(xhr){
xhr.setRequestHeader('Accept', 'application/json');
},
success: function (data) {
console.log(JSON.stringify(data));
},
error: function(a, b, c){
console.log(a);
console.log(b);
console.log(c);
}
});
Upvotes: 0
Views: 92