LiquidPlanner Classic Forum

Ask a Question
Back to All

How to use LP API in JavaScript?


I am trying to run this JS code from the doc:

var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
});"GET", "");


On running it on the browser, I get a prompt to enter username and password, after entering the credentials, I get the following error on local system and also on server after deploying:

Access to XMLHttpRequest at '' from origin 'http://localhost:3002' ( has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Is there any parameter configuration to be added on the xhr request to make it work?