Authentication loop (or block) while using jsreport online api

  • Dear JsReport team,

    For the last few days I've been trying to solve this problem: Whenever I try to render a report with jsreport online api, my website asks for authentication:


    I tried using my website's admin account, as well as the jsreport account, but it just didn't get through. That window keeps popping up, and it doesn't even show whether the account is correct or not.

    I'm new to both nodejs and jsreport, so this has really been difficult for me. I hope you guys can help me understand this authentication thing, or show me how to disable it completely if possible.

    Looking forward to your reply.
    Best regards,

  • administrators

    hi! that popup usually shows when either the credentials are not being sent or are invalid..

    can you share the code that you are using to communicate with jsreportonline? that would help to identify what is wrong

  • Hi,

    Below is my code:

    app.get('/invoice', function(req, res, next) {

    fs.readFile('./invoice.json', function (err, content) {
    	const invoiceData = JSON.stringify(JSON.parse(content));
    	var data = {
    		// data:invoiceData
    	var options = {
    	try {
      	} catch (err) {


    I believe I got the correct template's shortid and the api's uri. Everything else is on default, I made no change to them.

  • You seems to be using the node.js request module, right?
    In this case you are missing the auth in the options -

    Maybe you could also take a look on the official jsreport client for node.js which wraps some stuff like authentication for you

  • Thank you very much for your solution, jan_blaha. I tried adding username:password to the url and it finally works!

    Again, thanks for your help, han_blaha and bjrmatos.

  • Great! Thanks for info.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.