ShadiHashem1
7 years agoQrew Cadet
Updating QB field with from an javacript request
Hi,
I need to edit an existing field with a jwt token from an external system.
To do this I have created a javascript calling the AUTH process to request the jwt token.
My request code looks like this:
$.ajax({
type: 'POST',
url: "https://api.endpoint.url";,
processData: true,
data: {login: "username, password: "password"},
dataType: "JSON",
success: function (data) {
processData(data);
}
});
function processData(data){
var token = (data.sessionData);
console.log (token)
}
How can I save the variable "token" to a field in QB.
I need to recurrently update the same field with the token string as the token expires.
Hope anyone can help
Best regards
I need to edit an existing field with a jwt token from an external system.
To do this I have created a javascript calling the AUTH process to request the jwt token.
My request code looks like this:
$.ajax({
type: 'POST',
url: "https://api.endpoint.url";,
processData: true,
data: {login: "username, password: "password"},
dataType: "JSON",
success: function (data) {
processData(data);
}
});
function processData(data){
var token = (data.sessionData);
console.log (token)
}
How can I save the variable "token" to a field in QB.
I need to recurrently update the same field with the token string as the token expires.
Hope anyone can help
Best regards