I am trying to get some details from an external page with ana ajax request. Since i am getting back a answer from the server it seems for me the request is working fine, in the console i can even find the required information. My code is however giving me an error and a cant figure out why, can someone help? See Image where Error occurs after response!
This is the code is use to get the requested by ajax:
var auth_id = "xxxxxxxxxxxxxxxx";
var auth_token = "xxxxxxxxxxxxxxxx";
var jSON_Object = {
'auth_id': auth_id,
'auth_token': auth_token
};
var calluuid = null;
//Anruf aufnehmen
function RecordTheCall() {
var result = null;
var post = $.ajax({
url: "https://api.plivo.com/v1/Account/"+auth_id+"/Call/?status=live",
type: "GET",
dataType: "jsonp",
contentType: "application/json",
jsonCallback: "parseResponse",
data: JSON.stringify(jSON_Object),
success: function(res) {
console.log("1");
console.log(res);
//get uuid from active call
calluuid = res.call_uuid;
RecordIt();
},
error: function(err){
console.log("E1");
console.log(err);
}
});
}