Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Manish_Kumar_
Creator
Creator

Unable to make POST connection using REST API

Hi,

I am trying to operate Qlik Nprinting using Qlik Sense. Reason is below

Manish_Kumar__2-1692297792164.png

For that, I came through a Qlik Help video: https://youtu.be/FqwNU_pnFt4
And In this video there is reference to a pdf (is attached), which guides the complete process for making the GET and POST requests using REST API.

 

Now I successfully created GET connection following the procedure in the pdf document but I am having trouble in creating POST connection. Which is throwing below error.

Manish_Kumar__0-1692297621175.png

 

Can anyone please suggest here!

 

Manish Kumar, Senior Business Analyst
Labels (1)
3 Replies
daturpin
Partner - Creator II
Partner - Creator II

Hard to say?  Reading the PDF, there seems to be a lot of reasons why it might fail:

Do you have REST connector 1.3 or higher?

Is Qlik and NPrinting running on the same machine?

Did you do this part:

"Under the “Query headers” section we inserted “Origin” as Name and the Qlik Sense server hostname as
value (the same hostname that we inserted in the NPrinting Trusted Origins); this is a requirement to
make the connection work using CORS."

Do you have the appropriate Administration account and an NT account as is specified? 

LDR
Creator II
Creator II

Hi @Manish_Kumar_ 

I'm trying to do exactly the same than you. In my case, I noticed that in the article variable vCookie is obtained executing the sentence below:

let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2);

In my case I had to use the next one:

Let vCookie = TextBetween('$(vCookieRaw)','SameSite=None,',' Path=/',2);

Now I have a different issue because when I executed the following code I receive an error:

LDR_3-1692705393595.png

 

LDR_0-1692704823015.png

Ah! depending of the Qlik Sense release you use, you can find issues with Rest Connector. In my case I'm using Qlik Sense May'2023 Patch 3 and I had to apply the workaround explained in the following link:

https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-May-2023-Patch-3-causes-REST-conn...

If I find how to solve it I'll share it and if on the other hand, somebody had the same issue than us and fixed it, please let us know.

Thanks

 

 

 

LDR
Creator II
Creator II

Hi @Manish_Kumar_ , @daturpin 

I saw where was my mistake. I got a wrong value for vCookie:

  • Instead of:

Let vCookie = TextBetween('$(vCookieRaw)','SameSite=None,',' Path=/',2);

  • I'm using:

Let vCookie = TextBetween('$(vCookieRaw)','SameSite=None,',' Path=/',3);

Now it works.

Regards