Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

NPrinting API Call fail HTTP 403 Wrong format

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

NPrinting API Call fail HTTP 403 Wrong format

Last Update:

May 8, 2020 3:40:25 AM

Updated By:

Sonja_Bauernfeind

Created date:

May 8, 2020 3:40:25 AM

Description:


When calling NPrinting API inside QlikSense script to trigger NPrinting publishing tasks you might get the following messsage in the script output:

HTTP protocol error 403 (Forbidden): The server refused to fulfill the request.: RestConnectorMasterTable: SQL SELECT "__KEY_data", (SELECT "id", "name", "description", "type", "created", "lastUpdate", "lastExecution", "enabled", "appId", "__FK_items" FROM "items" FK "__FK_items") FROM JSON (wrap off) "data" PK "__KEY_data" with Connection (URL " HTTPHEADER "Cookie" "")
 

Cause:


Chrome SameSite cookie
Jira issue ID: OP-9144

Starting from February 2020, Google Chrome 80 manages the SameSite cookie differently. Qlik NPrinting supports this new configuration on both HTTP and HTTPS connections. On-Demand for Qlik Sense and QlikView will continue to work.

Resolution:


Starting from February 2020, Google Chrome 80 manages the SameSite cookie differently. Qlik NPrinting supports this new configuration on both HTTP and HTTPS connections. On-Demand for Qlik Sense and QlikView will continue to work.

The above change has an impact on all users using API calls running from Qlik Sense or QlikView load scripts as the script to return variable with cookie string will be empty. 

You need to adjust your script for it to continue to work:

Old version (before February 2020):

//Extracts session cookie from the API response
let vCookieRaw = Peek('Set-Cookie',0,'_response_header');
let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2);

New Version (note that you need to change the way variable vCookie is created):

//Extracts session cookie from the API response
Let vCookieRaw  = Peek('Set-Cookie',0,'cookie_items');
Let vCookie     = TextBetween('$(vCookieRaw)','SameSite=None,','Path=/',2);


 

Version history
Last update:
‎2020-05-08 03:40 AM
Updated by: