طلحة
طلحة

Reputation: 405

In here maps while testing my api code and app code for places API I am getting 401 despite I have recently generated new API codes

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

Answers (1)

Satheesh
Satheesh

Reputation: 171

Please Remove the { } in api I'd and api code and try

Upvotes: 1

Related Questions