Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have installed Qliksense using silent installer methods, Now I'm trying to add license via CLI, while hitting qrs api https://localhost:4242/qrs/about?xrfkey=1234567890qazxsw ending up with "The request was aborted: Could not create SSL/TLS secure channel." Even after exporting all (client.pem, client_key.pem, root.pem) the certificates from .Local Certificate into client.pfx
I'm using latest license version (Signed License Key) Model.
@qlik, @qliksense Also I couldn't find any document to automate License addition process for latest version as such Qlik Sense: How to automate the installation and configuration with commands and APIs
@kikiram Hi, here is a link to the latest help document for this
where $body = @{ key = $slk } | ConvertTo-Json
Also it would be helpful if any other ways to activate SLK with qlik-cli
Reference code which works on May 2025 (I doubt this varies between versions):
$hdrs = @{}
$hdrs.Add("X-Qlik-Xrfkey","examplexrfkey123")
$hdrs.Add("X-Qlik-User", "UserDirectory=QMI-QS-d208; UserId=qmi")
# Grab the Client certificate to trust the QRS request
$cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'}
# Construct the FQDN
# Use case is being run on the Qlik Sense Server
$Data = Get-Content C:\ProgramData\Qlik\Sense\Host.cfg
# Convert the base64 encoded install name for Sense to UTF data
$FQDN = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($($Data)))
# Construct the body for the POST request
$body = '{"key":"eyJhb"}'
# Handle TLS 1.2 only environments
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
Invoke-RestMethod -Uri "https://$($FQDN):4242/qrs/license?xrfkey=examplexrfkey123" -Method Post -Body $body -Headers $hdrs -ContentType 'application/json' -Certificate $cert
Notes of configurable values:
Line 3: I'd use whatever user you intend to log in. Upon licensing Qlik Sense Enterprise - Client Managed, the user who licenses the cluster is made a RootAdmin. Do cmd.exe > whoami to determine the account that you're interactively logging in as
Line 12: Obviously specify your SLK here.