
Contributor
2023-10-26
11:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Connecting to QlikSense Python API
Hello,
I’m trying to connect Python to QlikSense in order to perform the same operations as the Qlik engine API explorer, but when I try this code:
import websocket
import ssl
import json
import requests
user_directory = <user_directory>
user_id = <user_id >
header = ['X-Qlik-User: UserDirectory=' + user_directory + '; UserId=' + user_id]
ws = websocket.create_connection("wss://<myserver>/app/", sslopt={"cert_reqs": ssl.CERT_NONE},header=header)
ws.send(json.dumps({
"handle": -1,
"method": "GetDocList",
"params": [],
"outKey": -1,
"id": 1
}))
result = ws.recv()
print(result)
ws.close()
It returns this to me:
{"jsonrpc":"2.0","method":"OnAuthenticationInformation","params":{"loginUri":"https://<myserver>/internal_forms_authentication/?targetId=<ID>","mustAuthenticate":true}}
How can it return the result of my query ?
Thanks !
1 Reply

Contributor
2023-11-28
01:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the message it returned, the property "mustAuthenticate" is set to "true" indicates that you have not yet been correctly authenticated.
461 Views
