<?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 C# get data from qlik in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/C-get-data-from-qlik/m-p/1823850#M1232166</link>
    <description>&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;My goal is fetch data from qlik's charts&lt;/P&gt;&lt;P&gt;1. I used HTTPWebRequest like bellow (but how can&amp;nbsp; get data ?). i found that i should use location, and after connection i'l get data from hypercubes, like that:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;// The default port number is 4747 but can be customized&lt;BR /&gt;var uri = new Uri("&lt;A href="https://myserver:4242" target="_blank"&gt;https://myserver:4242&lt;/A&gt;");&lt;BR /&gt;ILocation location = Location.FromUri(uri);&lt;BR /&gt;var x509 = new X509Certificate2(File.ReadAllBytes(@"C:\QlikCert\clinet_final.pfx"), "");&lt;BR /&gt;X509Certificate2Collection certificateCollection = new X509Certificate2Collection(x509);&lt;BR /&gt;location.AsDirectConnection(userDirectory: "domain", userId: "user", certificateCollection: certificateCollection);&lt;BR /&gt;Console.WriteLine("Step1");&lt;/P&gt;&lt;P&gt;//var location = ConnectToDesktop();&lt;BR /&gt;var allApps = OpenAllApps(location).ToArray();&lt;/P&gt;&lt;P&gt;if (allApps.Any())&lt;BR /&gt;{&lt;BR /&gt;UseAbstractStructureOnMasterObjects(allApps);&lt;BR /&gt;UseAbstractStructureOnMapLayers(allApps);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Console.WriteLine("Press enter to close.");&lt;BR /&gt;Console.ReadLine();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i have an error(empty Certificate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/// Code to fetch ID's&lt;/P&gt;&lt;P&gt;static async Task Main(string[] args)&lt;BR /&gt;{&lt;BR /&gt;// locate the client certificate and accept it as trusted&lt;/P&gt;&lt;P&gt;var SenseCert = new X509Certificate2(File.ReadAllBytes(@"C:\QlikCert\client_final.pfx"), "");&lt;/P&gt;&lt;P&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Create the HTTP Request and add required headers and content in xrfkey&lt;/P&gt;&lt;P&gt;string xrfkey = "0123456789abcdef";&lt;/P&gt;&lt;P&gt;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"&lt;A href="https://myserver/single/?appid=9a819bbe-6094-44ea-9025-cf0379121f38&amp;amp;obj=ANRsbjb&amp;amp;opt=ctxmenu,currsel&amp;amp;select=$::%D0%93%D0%BE%D0%B4,2017,2018,2019,2020,2021,2022,2023,2024,2025?xrfkey=" target="_blank"&gt;https://myserver/single/?appid=9a819bbe-6094-44ea-9025-cf0379121f38&amp;amp;obj=ANRsbjb&amp;amp;opt=ctxmenu,currsel&amp;amp;select=$::%D0%93%D0%BE%D0%B4,2017,2018,2019,2020,2021,2022,2023,2024,2025?xrfkey=&lt;/A&gt;" + xrfkey);&lt;/P&gt;&lt;P&gt;/// i recieve Base64 img teg&lt;/P&gt;&lt;P&gt;request.Method = "GET";&lt;/P&gt;&lt;P&gt;request.Accept = "application/json";&lt;/P&gt;&lt;P&gt;request.Headers.Add("X-Qlik-xrfkey", xrfkey);&lt;/P&gt;&lt;P&gt;// Add the certificate to the request and provide the user to execute as&lt;/P&gt;&lt;P&gt;request.ClientCertificates.Add(SenseCert);&lt;/P&gt;&lt;P&gt;request.Headers.Add("X-Qlik-User", @"UserDirectory=internal;UserId=sa_repository");&lt;/P&gt;&lt;P&gt;// make the web request and return the content&lt;/P&gt;&lt;P&gt;HttpWebResponse response = (HttpWebResponse)request.GetResponse();&lt;/P&gt;&lt;P&gt;Stream stream = response.GetResponseStream();&lt;/P&gt;&lt;P&gt;//Console.WriteLine(new StreamReader(stream).ReadToEnd());&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;// Create a StreamReader&lt;BR /&gt;using (StreamReader reader = new StreamReader(stream))&lt;BR /&gt;{&lt;BR /&gt;string line;&lt;BR /&gt;// Read line by line&lt;BR /&gt;while ((line = reader.ReadLine()) != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(line);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (Exception exp)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(exp.Message);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator>Sharip</dc:creator>
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>C# get data from qlik</title>
      <link>https://community.qlik.com/t5/QlikView/C-get-data-from-qlik/m-p/1823850#M1232166</link>
      <description>&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;My goal is fetch data from qlik's charts&lt;/P&gt;&lt;P&gt;1. I used HTTPWebRequest like bellow (but how can&amp;nbsp; get data ?). i found that i should use location, and after connection i'l get data from hypercubes, like that:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;// The default port number is 4747 but can be customized&lt;BR /&gt;var uri = new Uri("&lt;A href="https://myserver:4242" target="_blank"&gt;https://myserver:4242&lt;/A&gt;");&lt;BR /&gt;ILocation location = Location.FromUri(uri);&lt;BR /&gt;var x509 = new X509Certificate2(File.ReadAllBytes(@"C:\QlikCert\clinet_final.pfx"), "");&lt;BR /&gt;X509Certificate2Collection certificateCollection = new X509Certificate2Collection(x509);&lt;BR /&gt;location.AsDirectConnection(userDirectory: "domain", userId: "user", certificateCollection: certificateCollection);&lt;BR /&gt;Console.WriteLine("Step1");&lt;/P&gt;&lt;P&gt;//var location = ConnectToDesktop();&lt;BR /&gt;var allApps = OpenAllApps(location).ToArray();&lt;/P&gt;&lt;P&gt;if (allApps.Any())&lt;BR /&gt;{&lt;BR /&gt;UseAbstractStructureOnMasterObjects(allApps);&lt;BR /&gt;UseAbstractStructureOnMapLayers(allApps);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Console.WriteLine("Press enter to close.");&lt;BR /&gt;Console.ReadLine();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i have an error(empty Certificate)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/// Code to fetch ID's&lt;/P&gt;&lt;P&gt;static async Task Main(string[] args)&lt;BR /&gt;{&lt;BR /&gt;// locate the client certificate and accept it as trusted&lt;/P&gt;&lt;P&gt;var SenseCert = new X509Certificate2(File.ReadAllBytes(@"C:\QlikCert\client_final.pfx"), "");&lt;/P&gt;&lt;P&gt;ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Create the HTTP Request and add required headers and content in xrfkey&lt;/P&gt;&lt;P&gt;string xrfkey = "0123456789abcdef";&lt;/P&gt;&lt;P&gt;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"&lt;A href="https://myserver/single/?appid=9a819bbe-6094-44ea-9025-cf0379121f38&amp;amp;obj=ANRsbjb&amp;amp;opt=ctxmenu,currsel&amp;amp;select=$::%D0%93%D0%BE%D0%B4,2017,2018,2019,2020,2021,2022,2023,2024,2025?xrfkey=" target="_blank"&gt;https://myserver/single/?appid=9a819bbe-6094-44ea-9025-cf0379121f38&amp;amp;obj=ANRsbjb&amp;amp;opt=ctxmenu,currsel&amp;amp;select=$::%D0%93%D0%BE%D0%B4,2017,2018,2019,2020,2021,2022,2023,2024,2025?xrfkey=&lt;/A&gt;" + xrfkey);&lt;/P&gt;&lt;P&gt;/// i recieve Base64 img teg&lt;/P&gt;&lt;P&gt;request.Method = "GET";&lt;/P&gt;&lt;P&gt;request.Accept = "application/json";&lt;/P&gt;&lt;P&gt;request.Headers.Add("X-Qlik-xrfkey", xrfkey);&lt;/P&gt;&lt;P&gt;// Add the certificate to the request and provide the user to execute as&lt;/P&gt;&lt;P&gt;request.ClientCertificates.Add(SenseCert);&lt;/P&gt;&lt;P&gt;request.Headers.Add("X-Qlik-User", @"UserDirectory=internal;UserId=sa_repository");&lt;/P&gt;&lt;P&gt;// make the web request and return the content&lt;/P&gt;&lt;P&gt;HttpWebResponse response = (HttpWebResponse)request.GetResponse();&lt;/P&gt;&lt;P&gt;Stream stream = response.GetResponseStream();&lt;/P&gt;&lt;P&gt;//Console.WriteLine(new StreamReader(stream).ReadToEnd());&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;// Create a StreamReader&lt;BR /&gt;using (StreamReader reader = new StreamReader(stream))&lt;BR /&gt;{&lt;BR /&gt;string line;&lt;BR /&gt;// Read line by line&lt;BR /&gt;while ((line = reader.ReadLine()) != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(line);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (Exception exp)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine(exp.Message);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/C-get-data-from-qlik/m-p/1823850#M1232166</guid>
      <dc:creator>Sharip</dc:creator>
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
  </channel>
</rss>

