Hi anton,
how are you? :)
I have a question, the first condition: i was accessing traccar service from the same domain to get device list and it was success. Then the 2nd condition (now) i tried to access the device list from different domain (also the server is different) with the same code, and it returns success when i tried to POST email and password for login, but when i tried to GET session, it always return "Not Found". Here the code:
function getSession(){
$.ajax({
type:"post",
url:"http://deltaapp.site:3459/api/session",
data:{email:"<?=$traccar_email?>", password:"<?=$traccar_password?>"},
xhrFields: {
withCredentials: true
}
})
.done(function(data, status, xhr){
$.ajax({
type:"get",
url:"http://deltaapp.site:3459/api/session",
xhrFields: {
withCredentials: true
}
})
.done(function(data){
getMachineInformation();
})
.fail(function(msg){
console.log(msg);
});
});
}
please need your help asap.. thanks anton :)
Hi anton,
how are you? :)
I have a question, the first condition: i was accessing traccar service from the same domain to get device list and it was success. Then the 2nd condition (now) i tried to access the device list from different domain (also the server is different) with the same code, and it returns success when i tried to POST email and password for login, but when i tried to GET session, it always return "Not Found". Here the code:
function getSession(){ $.ajax({ type:"post", url:"http://deltaapp.site:3459/api/session", data:{email:"<?=$traccar_email?>", password:"<?=$traccar_password?>"}, xhrFields: { withCredentials: true } }) .done(function(data, status, xhr){ $.ajax({ type:"get", url:"http://deltaapp.site:3459/api/session", xhrFields: { withCredentials: true } }) .done(function(data){ getMachineInformation(); }) .fail(function(msg){ console.log(msg); }); }); }
please need your help asap.. thanks anton :)