<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connecting to the API using REST connector in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1781728#M31200</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48712"&gt;@Frank_S&lt;/a&gt;&amp;nbsp;, Im trying to use your solution to authenticate and obtain a cookie.&amp;nbsp; Im getting the following value in vCookieRaw :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT size="2"&gt;NPWEBCONSOLE_XSRF-TOKEN=wRyvZ2qjtGcI6tGXNd90mYU6rPDI18nsw8AhEB40uCk=; Path=/; Secure; SameSite=None,NPWEBCONSOLE_SESSION=65341eebe9eb381e18c1e6c879069e73badb3f44-%00NPWEBCONSOLE_XSRF-TOKEN%3AwRyvZ2qjtGcI6tGXNd90mYU6rPDI18nsw8AhEB40uCk%3D%00%00_TS%3Asession%00; Path=/; HttpOnly; Secure; SameSite=None,NPWEBCONSOLE_XSRF-TOKEN=LT2/MZA7JvmXD6lyUK1+Wrv0pFjzHvrig0YjezJ7IVA=; Path=/; Secure; SameSite=None,NPWEBCONSOLE_SESSION=e18cf65f61f7e65d9e5508264b087a0066ffa7a3-%00NPWEBCONSOLE_XSRF-TOKEN%3ALT2%2FMZA7JvmXD6lyUK1%2BWrv0pFjzHvrig0YjezJ7IVA%3D%00%00_TS%3Asession%00%00userid%3A0af4f1283276452c8a33f385dccd8e5f%00%00userlogin%3A2021-02-10T16%3A55%3A22.6487917Z%00; Path=/; HttpOnly; Secure; SameSite=None&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT size="4"&gt;&lt;SPAN class="Apple-converted-space"&gt;However, the&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;STRONG&gt;let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2);&lt;/STRONG&gt; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;is coming through as blank.&amp;nbsp; Are you able to advise please on what my issues may be?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;Many thanks for your time&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 17:03:57 GMT</pubDate>
    <dc:creator>Senor_Dai</dc:creator>
    <dc:date>2021-02-10T17:03:57Z</dc:date>
    <item>
      <title>Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1541504#M22466</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm getting 401 unauthorized access every time I try to connect to the API on QV 12.20 using the rest connector. &lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="NP2.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5513i300E4C00C105513D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NP2.png" alt="NP2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have followed every PDF and link that I have found (and there's quite a lot) and&amp;nbsp;done everything needed as far as I can tell.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am using QV12.20 desktop and server, NP nov-18, rest connector 1.3 (and 1.75, tried both), on a windows server 2016. Everything in the same machine.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Everything is well connected, I can launch NP tasks that use QV server documents, and I was even able to use the API from an html to launch a NP task (on chrome, same html doesnt work on explorer). But the rest connector fails to connect with 401 error code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is how I configure it:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="NP1.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5515i1364FB91850F9009/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NP1.png" alt="NP1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will see it is http and not https, I also tried with https, but trying to fix this error I switched to http (doing everything necessary on nprinting, which is working on http now:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="NP5.png" style="width: 827px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5517i80F2449B15BD400D/image-size/large?v=v2&amp;amp;px=999" role="button" title="NP5.png" alt="NP5.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The NPRINTING user with administrator role is correct, and I can use the windows login for nprinting with it:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="NP4.png" style="width: 256px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5516iA9682E31B1959028/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NP4.png" alt="NP4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;And I tried with a lot of trusted origins along all my tests:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="NP3.png" style="width: 216px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5518iEBF6B2FB0D2C1F93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NP3.png" alt="NP3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have followed several guides and everything is the same, so I have no idea why it isnt working. Using postmaster, I also get 401 unauthorized, but I dont know how to use that program very well, so maybe Im doing something wrong there.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Like I said, with an html and the following code, it's working (on chrome, not IE):&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;(function(){
                console.log("started")
                var taskIDs=[
                    "1588aa16-3138-4fdc-96a7-70e84657a5f7",
                ]
                $.ajax({
                        url: 'http://QLIKVIEW01:4993/api/v1/login/ntlm',
                        xhrFields: {
                            withCredentials: true
                        }
                    }).done(function(data) {
                        console.log(data);
                        
                        for(var i=0;i&amp;lt;taskIDs.length;i++){
                            $.ajax({
                                type: "POST",
                                url: 'http://QLIKVIEW01:4993/api/v1/tasks/'+taskIDs[i]+'/executions',
                                xhrFields: {
                                    withCredentials: true
                                }
                            }).done(function(data) {
                                console.log("task "+i);
                                console.log(data);
				&amp;lt;!-- if(i==taskIDs.length) --&amp;gt;
					&amp;lt;!-- open(location, '_self').close(); --&amp;gt;
                            });
                        }
                    });
            })();&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;But everything I try on the REST connector, fails to authenticate.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Well, if I put the URL:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;http://QLIKVIEW01:4993&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;It connects, but doesnt authenticate me so I cant do anything after that. And if I add the&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;/api/v1/login/ntlm&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;I get the 401 error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Any help would be appreciated, thanks.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;On a side note, does rest connector 1.3 work with QV11.20?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 18:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1541504#M22466</guid>
      <dc:creator>kalarro</dc:creator>
      <dc:date>2019-09-25T18:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1541818#M22474</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I'm not exactly sure what is causing this issue.&lt;/P&gt;
&lt;P&gt;I have tested your scenario without a QV server and it worked for me while using a local NP connection to the QVW that needs to be either reloaded in NPrinting or a task that needs to be executed in NPrinting.&lt;/P&gt;
&lt;P&gt;So to that end, I am attached my QVW containing load script that is working. Note that this code is currently set up to execute all tasks in the QVWS app.&lt;/P&gt;
&lt;P&gt;You will need to replace &lt;U&gt;&lt;STRONG&gt;QVWS&lt;/STRONG&gt; &lt;/U&gt;with the name of your App.&lt;/P&gt;
&lt;P&gt;Also the code is set up to execute all tasks (and connections...currently commented out of the attached code) in the QVWS app (not individual tasks and connections).&lt;/P&gt;
&lt;P&gt;You will also need to:&lt;/P&gt;
&lt;P&gt;1. replace your NP server name with the one that is in the code of course&lt;/P&gt;
&lt;P&gt;2. you will need to comment out my rest connector connection string and use your own. You should also comment out anything else you don't need.&lt;/P&gt;
&lt;P&gt;Finally, you will find the connector compatibility matrix found as a link within the following article:&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://support-cdn.qlik.com/articles/000059611" target="_blank"&gt;https://support-cdn.qlik.com/articles/000059611&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note: that QV 11.2 does not support the use of Rest Conn 1.3 as per the rest connector compatibility matrix&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps to get things working for you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 21:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1541818#M22474</guid>
      <dc:creator>Frank_S</dc:creator>
      <dc:date>2019-02-08T21:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1542172#M22496</link>
      <description>&lt;P&gt;Thanks a lot for your time.&lt;/P&gt;&lt;P&gt;The problem is this:&lt;/P&gt;&lt;PRE&gt;2. you will need to comment out my rest connector connection string and use your own.&lt;/PRE&gt;&lt;P&gt;That's exactly the point that isn't working for me. I can't&amp;nbsp;close the popup windows of the Rest Connector that creates the string, because it says:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;HTTP protocol error 401 (Unauthorized)&lt;/PRE&gt;&lt;P&gt;But the user and password I use are working on the NPrinting console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 09:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1542172#M22496</guid>
      <dc:creator>kalarro</dc:creator>
      <dc:date>2019-02-11T09:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1542179#M22497</link>
      <description>&lt;P&gt;I just managed to solve it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a new user account and didnt use any special characters on the password. The previous one was using a . (dot)&lt;/P&gt;&lt;P&gt;With the new user, it is working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is strange, since windows server encourages the use of special characters on the password, yet the rest connection to NPrinting fails with unauthorized error, without any further explanation.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 09:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1542179#M22497</guid>
      <dc:creator>kalarro</dc:creator>
      <dc:date>2019-02-11T09:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1781728#M31200</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48712"&gt;@Frank_S&lt;/a&gt;&amp;nbsp;, Im trying to use your solution to authenticate and obtain a cookie.&amp;nbsp; Im getting the following value in vCookieRaw :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT size="2"&gt;NPWEBCONSOLE_XSRF-TOKEN=wRyvZ2qjtGcI6tGXNd90mYU6rPDI18nsw8AhEB40uCk=; Path=/; Secure; SameSite=None,NPWEBCONSOLE_SESSION=65341eebe9eb381e18c1e6c879069e73badb3f44-%00NPWEBCONSOLE_XSRF-TOKEN%3AwRyvZ2qjtGcI6tGXNd90mYU6rPDI18nsw8AhEB40uCk%3D%00%00_TS%3Asession%00; Path=/; HttpOnly; Secure; SameSite=None,NPWEBCONSOLE_XSRF-TOKEN=LT2/MZA7JvmXD6lyUK1+Wrv0pFjzHvrig0YjezJ7IVA=; Path=/; Secure; SameSite=None,NPWEBCONSOLE_SESSION=e18cf65f61f7e65d9e5508264b087a0066ffa7a3-%00NPWEBCONSOLE_XSRF-TOKEN%3ALT2%2FMZA7JvmXD6lyUK1%2BWrv0pFjzHvrig0YjezJ7IVA%3D%00%00_TS%3Asession%00%00userid%3A0af4f1283276452c8a33f385dccd8e5f%00%00userlogin%3A2021-02-10T16%3A55%3A22.6487917Z%00; Path=/; HttpOnly; Secure; SameSite=None&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT size="4"&gt;&lt;SPAN class="Apple-converted-space"&gt;However, the&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;STRONG&gt;let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2);&lt;/STRONG&gt; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;is coming through as blank.&amp;nbsp; Are you able to advise please on what my issues may be?&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;Many thanks for your time&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 17:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1781728#M31200</guid>
      <dc:creator>Senor_Dai</dc:creator>
      <dc:date>2021-02-10T17:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting to the API using REST connector</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1781756#M31201</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/17101"&gt;@Senor_Dai&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please check the following article very carefully.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Support-Knowledge-Base/NPrinting-API-Setup-Requirements/ta-p/1715507" target="_blank"&gt;https://community.qlik.com/t5/Support-Knowledge-Base/NPrinting-API-Setup-Requirements/ta-p/1715507&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have check the above link thoroughly, please start a new community discussion outlining your issues and explain:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Steps to configure the solution&lt;/LI&gt;&lt;LI&gt;Steps to reproduce the issue&lt;/LI&gt;&lt;LI&gt;Expected results&lt;/LI&gt;&lt;LI&gt;Actual results&lt;/LI&gt;&lt;LI&gt;Version of Qlik Sense&lt;/LI&gt;&lt;LI&gt;Version of NPrinting&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 19:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Connecting-to-the-API-using-REST-connector/m-p/1781756#M31201</guid>
      <dc:creator>Frank_S</dc:creator>
      <dc:date>2021-02-10T19:41:44Z</dc:date>
    </item>
  </channel>
</rss>

