0

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);
  }
});
1
  • 1
    oh I am sorry I need to remove curly braces...Its working fine now...Alhamdulillah... Commented Dec 13, 2018 at 1:48

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.