<?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 Why do i keep getting the login page with this API call in PS? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17456#M265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;&lt;SPAN class="s5"&gt;New-Object&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;System.Net.WebClient&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;Method &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s6"&gt;"GET"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;UserAgent &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s6"&gt;"Windows"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Accept &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;"application/json"&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;Credentials &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s7"&gt;System.Net.CredentialCache&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;]::&lt;/SPAN&gt;DefaultCredentials;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Headers&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Add(&lt;/SPAN&gt;"X-Qlik-xrfkey"&lt;SPAN class="s4"&gt;,&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;"ABCDEFG123456789"&lt;SPAN class="s3"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;DownloadString(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://url:12345/qrs/about?xrfkey=ABCDEFG123456789" rel="nofollow" target="_blank"&gt;https://url:12345/qrs/about?xrfkey=ABCDEFG123456789&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;);&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;anyone can help with? what i'm missing?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 22:05:46 GMT</pubDate>
    <dc:creator>amien</dc:creator>
    <dc:date>2018-01-29T22:05:46Z</dc:date>
    <item>
      <title>Why do i keep getting the login page with this API call in PS?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17456#M265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="p1"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;&lt;SPAN class="s5"&gt;New-Object&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;System.Net.WebClient&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;Method &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s6"&gt;"GET"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;UserAgent &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s6"&gt;"Windows"&lt;/SPAN&gt;;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Accept &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;"application/json"&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;Credentials &lt;SPAN class="s4"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;[&lt;/SPAN&gt;&lt;SPAN class="s7"&gt;System.Net.CredentialCache&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;]::&lt;/SPAN&gt;DefaultCredentials;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Headers&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;Add(&lt;/SPAN&gt;"X-Qlik-xrfkey"&lt;SPAN class="s4"&gt;,&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;"ABCDEFG123456789"&lt;SPAN class="s3"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;$req&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;DownloadString(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://url:12345/qrs/about?xrfkey=ABCDEFG123456789" rel="nofollow" target="_blank"&gt;https://url:12345/qrs/about?xrfkey=ABCDEFG123456789&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;);&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;anyone can help with? what i'm missing?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 22:05:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17456#M265</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2018-01-29T22:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why do i keep getting the login page with this API call in PS?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17457#M266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i don't need to do something with a certificate right? because i'm executing the PS1 script under the same account as service account of Qlik Sense services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ABCDEFG123456789 key i create random ofcourse.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 09:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17457#M266</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2018-01-30T09:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why do i keep getting the login page with this API call in PS?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17458#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is port 12345? Is this the QRS port (4242) or the Proxy HTTPS port (443)? If it's 443, then is the default virtual proxy setup for Forms auth?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample .ps1 since I couldn't get your code to run:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$hdrs = @{}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$hdrs.Add("X-Qlik-Xrfkey","12345678qwertyui")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$hdrs.Add("X-Qlik-User", "UserDirectory=INTERNAL; UserId=sa_api")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$myFQDN=(Get-WmiObject win32_computersystem).DNSHostName+"."+(Get-WmiObject win32_computersystem).Domain&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$myFQDN = $myFQDN.ToLower()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN&gt;Invoke-RestMethod -Uri "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://$($myFQDN):4242/qrs/about?xrfkey=12345678qwertyui" rel="nofollow" target="_blank"&gt;https://$($myFQDN):4242/qrs/about?xrfkey=12345678qwertyui&lt;/A&gt;&lt;SPAN&gt;" -Method Get -Headers $hdrs -ContentType 'application/json' -Certificate $cert'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Likewise, what is the response from Powershell?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 18:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17458#M267</guid>
      <dc:creator>Levi_Turner</dc:creator>
      <dc:date>2018-01-30T18:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why do i keep getting the login page with this API call in PS?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17459#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;12345 is my https port which i changed in qmc (instead of 443)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from my code the result is that i get some kind of java/html login page (code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form is not default. Default is from installation: Central Proxy (Default) Ticket/Windows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your code gives this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;Invoke-RestMethod : The remote server returned an error: (403) Forbidden.&lt;/P&gt;&lt;P class="p1"&gt;At line:14 char:1&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN&gt;+ Invoke-RestMethod -Uri "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://$($myFQDN):4242/qrs/about?xrfkey=12345678qwertyu" rel="nofollow" target="_blank"&gt;https://$($myFQDN):4242/qrs/about?xrfkey=12345678qwertyu&lt;/A&gt;&lt;SPAN&gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;+ CategoryInfo&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;: InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:52:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17459#M268</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2018-01-30T19:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why do i keep getting the login page with this API call in PS?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17460#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;works now thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 22:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Why-do-i-keep-getting-the-login-page-with-this-API-call-in-PS/m-p/17460#M269</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2018-01-30T22:03:17Z</dc:date>
    </item>
  </channel>
</rss>

