403 error when accessing JSON API as a signed in user?
Hi There
I'm using the DX cloud version and am wanting to access a JSON API via ajax from the web browser of a signed in user.
The specific JSON API is the data list API: https://kiwicivil.cloud.joget.com/jw/web/json/data/list/kc1/equipmentList
eg:
$.ajax({
type: "POST",
url: 'https://kiwicivil.cloud.joget.com/jw/web/json/data/list/kc1/equipmentList',
success: function(res) {
console.log(res);
},
dataType: "jsonp",
cache: false
});
If I am logged in as the administrator, then this work fine.
However if I am logged in as another user, then I get a 403 response.
If I include a data element, eg:
data: {
j_username : 'admin',
j_password : 'xxxx',
loginAs : 'xxxxx'
},
Then joget changes the login for the entire browser session.
Is there any way that I can access the JSON API as an existing signed in user without it returning a 403 error?
Cheers
Dave