AngularJS : Getting JSON Parse Error when trying to access Hipchat REST API

248 views Asked by At

Am trying to access Hipchat REST APIs from AngularJS. Am getting 200 response code. This is the code snippet:

$.ajax({

type: 'GET',

url: "http://api.hipchat.com/v1/users/list?format=json&auth_token=XXXXXXXXXXXXXXXXXXXXX",

dataCharset: 'jsonp',

contentType: "application/json; charset=utf-8",

dataType: "jsonp",

success: function(data, status) {

alert(status);

},

error: function(data,status) {

alert(status);

}

});

In Firefox, am getting the response as you see in the screenshot below, but getting parse error.

enter image description here

In Chrome, am not getting any response, but only parse error, as you can see below.

enter image description here

Can someone please help?

0

There are 0 answers