<?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 How to use Qlik API on client side in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1549016#M10062</link>
    <description>&lt;P&gt;Hello fellows,&lt;/P&gt;&lt;P&gt;I am using Qlik API to embed Qlik object into my web applications (already did by using iframe). But I am stuck at the execution model and wonder exactly how to use it. For more details, as Qlik API reference document, after creating config object, we register with method require.config() to make connection to Qlik Sense server, then we add module Qlik API and keep using API function to open app and get object, as following code:&lt;/P&gt;&lt;PRE&gt;var config = {
		host: "qliksenseserver.com",
		prefix: "/hdr/",
		port: "",
		isSecure: true
	};

require.config(config);

require.config( {
	baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
} );

require( ["js/qlik"], function ( qlik ) {
	qlik.setOnError( function ( error ) {
		$( '#popupText' ).append( error.message + "&amp;lt;br&amp;gt;" );
		$( '#popup' ).fadeIn( 1000 );
	} );
	$( "#closePopup" ).click( function () {
		$( '#popup' ).hide();
	} );

	//callbacks -- inserted here --
	//open apps -- inserted here --
	var app = qlik.openApp('e7577372-3cde-4854-806b-5dc9d57989c3', config);

	//get objects -- inserted here --
	app.getObject('QV01','akDGX');
	app.getObject('QV02','VtfsZDc');
	app.getObject('QV03','KnASd');
	app.getObject('QV04','vCNaSe');

} );&lt;/PRE&gt;&lt;P&gt;I have create proxy named "hdr", accept header authentication: hdr-user: qliksenseserver.com/paul&lt;/P&gt;&lt;P&gt;My question is: whether I can run these API on client side? If I could, how can I authenticate and get ticket as well as login session on client machine?&lt;/P&gt;&lt;P&gt;My problem can be briefed as following graphic:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Qlik sense embed.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6717iFA35F225F5DB96DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik sense embed.gif" alt="Qlik sense embed.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The syntax&lt;/P&gt;&lt;PRE&gt;require( ["js/qlik"], function ( qlik )&lt;/PRE&gt;&lt;P&gt;looks like Node JS function. Is this true? And how could I run API on client side?&lt;/P&gt;&lt;P&gt;If I cannot, could you recommend me proper model for my problem?&lt;/P&gt;&lt;P&gt;Thank you guys for your time.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:29:39 GMT</pubDate>
    <dc:creator>Paul_Antonio</dc:creator>
    <dc:date>2024-11-16T06:29:39Z</dc:date>
    <item>
      <title>How to use Qlik API on client side</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1549016#M10062</link>
      <description>&lt;P&gt;Hello fellows,&lt;/P&gt;&lt;P&gt;I am using Qlik API to embed Qlik object into my web applications (already did by using iframe). But I am stuck at the execution model and wonder exactly how to use it. For more details, as Qlik API reference document, after creating config object, we register with method require.config() to make connection to Qlik Sense server, then we add module Qlik API and keep using API function to open app and get object, as following code:&lt;/P&gt;&lt;PRE&gt;var config = {
		host: "qliksenseserver.com",
		prefix: "/hdr/",
		port: "",
		isSecure: true
	};

require.config(config);

require.config( {
	baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
} );

require( ["js/qlik"], function ( qlik ) {
	qlik.setOnError( function ( error ) {
		$( '#popupText' ).append( error.message + "&amp;lt;br&amp;gt;" );
		$( '#popup' ).fadeIn( 1000 );
	} );
	$( "#closePopup" ).click( function () {
		$( '#popup' ).hide();
	} );

	//callbacks -- inserted here --
	//open apps -- inserted here --
	var app = qlik.openApp('e7577372-3cde-4854-806b-5dc9d57989c3', config);

	//get objects -- inserted here --
	app.getObject('QV01','akDGX');
	app.getObject('QV02','VtfsZDc');
	app.getObject('QV03','KnASd');
	app.getObject('QV04','vCNaSe');

} );&lt;/PRE&gt;&lt;P&gt;I have create proxy named "hdr", accept header authentication: hdr-user: qliksenseserver.com/paul&lt;/P&gt;&lt;P&gt;My question is: whether I can run these API on client side? If I could, how can I authenticate and get ticket as well as login session on client machine?&lt;/P&gt;&lt;P&gt;My problem can be briefed as following graphic:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Qlik sense embed.gif" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6717iFA35F225F5DB96DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik sense embed.gif" alt="Qlik sense embed.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The syntax&lt;/P&gt;&lt;PRE&gt;require( ["js/qlik"], function ( qlik )&lt;/PRE&gt;&lt;P&gt;looks like Node JS function. Is this true? And how could I run API on client side?&lt;/P&gt;&lt;P&gt;If I cannot, could you recommend me proper model for my problem?&lt;/P&gt;&lt;P&gt;Thank you guys for your time.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1549016#M10062</guid>
      <dc:creator>Paul_Antonio</dc:creator>
      <dc:date>2024-11-16T06:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Qlik API on client side</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1550330#M10080</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This looks a bit strange: the config object at the beginning is the qlik config, not rrequirejs config, so the line require.config(config) should not be there. The config object should be used (and is used) in qlik.openApp().&lt;/P&gt;&lt;P&gt;BTW the require call is part of requirejs (&lt;A href="https://requirejs.org/" target="_blank"&gt;https://requirejs.org/&lt;/A&gt;), not Node in this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 09:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1550330#M10080</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-02-28T09:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Qlik API on client side</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1550366#M10081</link>
      <description>&lt;P&gt;Thank your for your attention in my problem.&lt;/P&gt;&lt;P&gt;I will adjust my code above.&lt;/P&gt;&lt;P&gt;Do you have any solution for &lt;STRONG&gt;authentication&lt;/STRONG&gt; and &lt;STRONG&gt;authorization&lt;/STRONG&gt; &lt;U&gt;directly from client to Qlik server&lt;/U&gt; (no need web application)?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 10:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-use-Qlik-API-on-client-side/m-p/1550366#M10081</guid>
      <dc:creator>Paul_Antonio</dc:creator>
      <dc:date>2019-02-28T10:04:04Z</dc:date>
    </item>
  </channel>
</rss>

