0 Replies Latest reply: Aug 17, 2018 7:32 AM by Rangam Seshadri RSS

    API Request

    Rangam Seshadri

      Hi All,


      I have come-up with below script, however it is keep loading but nit giving me any results.


      Can you please let me know if anything is missing in my script.



      function GetXrfKey() {

        $alphabet = $Null; For ($a=97;$a -le 122;$a++) { $alphabet += ,[char][byte]$a }

        For ($loop=1; $loop -le 16; $loop++) {

          $key += ($alphabet | Get-Random)


        return $key


      $xrfKey = GetXrfKey

      $cert=Get-ChildItem -Path "cert:\CurrentUser\My" | where {$_.Subject -like "*QlikClient*"}

      $url="" + $xrfKey



      Invoke-RestMethod -Method "get" -Uri $url -CertificateThumbprint $cert.Thumbprint -Headers $hrds