Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
miran
Contributor II
Contributor II

Perform authentication to the Qlik Sense Saas programmatically

Hey,

Is there a way to authenticate the request behind the scenes without the redirect to https://login.qlik.com/login?
I've been looking for the solution for a few days now and so far i haven't found it..

I'm trying to embed some sheets into a custom webapp for the tenant `f9a63nlnyf03yr4.us.qlikcloud.com`.
The problem i'm facing is that whenever i try to access the embedded sheet (using an iframe) and am not already logged in, it redirects me to the qlik's login page.

Can i somehow perform the authentication via code?

I have set up the `api-key`, `web-integration-id` and also `content security policy`.

I've tried using some apis, using `curl` and also via javascript libraries, such as `@nebula.js/stardust`, `enigma.js` and also `@qlik/sdk` and some endpoints were working, but not all of them, since i wasn't logged in.

Lastly I've created a proxy, which adds `authorization` header with the `Bearer api-key` to all requests and that one ends up redirecting me to the login page too!

Any ideas?

Thanks and take care!
Miran

Labels (2)
1 Solution

Accepted Solutions
alex_colombo
Employee
Employee

Hi @miran , you can use JWT auth. Here some info.

With this approach you can first login to Qlik SaaS calling one of his APIs with JWT then, when authentication is done, render your iframe.

Here you can find a example on how to login with JWT.

View solution in original post

4 Replies
alex_colombo
Employee
Employee

Hi @miran , you can use JWT auth. Here some info.

With this approach you can first login to Qlik SaaS calling one of his APIs with JWT then, when authentication is done, render your iframe.

Here you can find a example on how to login with JWT.

miran
Contributor II
Contributor II
Author

Hey,

Thanks for the links and thanks for enabling the jwt option on our account!

Will try it right away.

Thanks and take care!

Miran

 

htrimas
Contributor
Contributor

Do we need enigma.js to enable the iFrame without being re-directed to the login page?

alex_colombo
Employee
Employee

In the example eniga.js is used for retrieving the current app theme. If you want, you can avoid to use enigma.js for just render the iframe.