Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
wandapec
Partner - Contributor III
Partner - Contributor III

Qlik Sense NPrinting POST REST API Connection 403 (Forbidden) Error

I have created a GET REST connection to NPrinting and it works perfectly. This is the GET REST Connection Setup...
GET REST Connection SetupGET REST Connection Setup
My problem is that I am not able to set up a POST REST Connection. Everything is the same, except for the Method and the Trusted Locations, which has been loaded into NPrinting. 
POST REST Connection SetupPOST REST Connection Setup

I managed to get the POST working in Postman, by first doing a GET login. Then copying the XSRF-TOKEN out of the Cookie and adding it to a X-XSRF-TOKEN key under Headers.

Postman POST REST SetupPostman POST REST Setup

This was a manual workaround, the problem is how to do it when setting up a Qlik Sense POST REST login connection... I can't get the XSRF-TOKEN to add it to the connection, to get the connection to authenticate, i.e., not give the 403 (Forbidden) error...

Labels (2)
2 Solutions

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

When opening a new conversation in the community please always add the label with the correct version you are using. For example, the strig to retrieve the token changed and you need to use the correct one. 

Please check the following article https://community.qlik.com/t5/Official-Support-Articles/How-to-create-NPrinting-GET-and-POST-REST-co...and let us know if it solves.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

wandapec
Partner - Contributor III
Partner - Contributor III
Author

Thanks @Ruggero_Piccoli. I fixed the post...

I took a closer look at the post you linked to, which I had seen previously, and I had missed one small difference between what I was doing and Frank's setup..
In NPrinting, I added the Qlik Sense address as a trusted origin. Then in Qlik Sense, I think I was fooled by the word 'Trusted' and was adding the origin to the Trusted Locations section.
Changed it to the Query Headers section and it worked! 
Thanks for your help.
REST POST Correct OriginREST POST Correct Origin

View solution in original post

2 Replies
Ruggero_Piccoli
Support
Support

Hi,

When opening a new conversation in the community please always add the label with the correct version you are using. For example, the strig to retrieve the token changed and you need to use the correct one. 

Please check the following article https://community.qlik.com/t5/Official-Support-Articles/How-to-create-NPrinting-GET-and-POST-REST-co...and let us know if it solves.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
wandapec
Partner - Contributor III
Partner - Contributor III
Author

Thanks @Ruggero_Piccoli. I fixed the post...

I took a closer look at the post you linked to, which I had seen previously, and I had missed one small difference between what I was doing and Frank's setup..
In NPrinting, I added the Qlik Sense address as a trusted origin. Then in Qlik Sense, I think I was fooled by the word 'Trusted' and was adding the origin to the Trusted Locations section.
Changed it to the Query Headers section and it worked! 
Thanks for your help.
REST POST Correct OriginREST POST Correct Origin