Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Jul 8, 2024 6:23:30 AM
Sep 26, 2019 9:56:23 AM
Please note that due to changes in how browsers handle third-party cookies, you may wish to instead leverage the new qlik-embed framework with OAuth2 for your embedding needs, rather than the guidance in this tutorial.
In Qlik Cloud Services (Qlik Sense Enterprise SaaS), it is possible to get the iFrame HTML code to embed a chart in a webpage by right-clicking that chart and choosing "embed chart".
However, just placing this code on a web page is not sufficient to handle the authentication part.
The information provided in this article provides an example of how this can be achieved. Further customization is likely necessary. For assistance, join our active community in the Integrations and Extensions forum or contact our Consulting Services for an engagement.
Environments:
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script type="text/javascript">
const webIntegrationId = "g-yrbnOz9wV5-YnIqYLZMgfAxf_iKg30";
function login() {
function isLoggedIn() {
return fetch("https://yourtenant.eu.qlikcloud.com/api/v1/users/me", {
method: 'GET',
mode: 'cors',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'qlik-web-integration-id': webIntegrationId,
},
}).then(response => {
return response.status === 200;
});
}
return isLoggedIn().then(loggedIn => {
if (!loggedIn) {
// check login
window.top.location.href = "https://yourtenant.eu.qlikcloud.com/login?qlik-web-integration-id=" + webIntegrationId + "&returnto=" + top.location.href;
throw new Error('not logged in');
}
});
}
login()
</script>
</head>
<body style="height:600px;">
<iframe
src="https://yourtenant.eu.qlikcloud.com/single/?appid=9539b869-1c84-4e6d-9129-4c5b031ca88a&obj=WJhPv&opt=ctxmenu,currsel"
style="border:none;width:100%;height:100%;"></iframe>
</body>
</html>
const webIntegrationID = "IDGOESHERE";
<iframe>src="linktotheobjecthere"></iframe>
Hi,
I'm trying to embed a chart using iFrame on my website www.claudiuanghelescu.xyz from Qlik Sense Business Cloud but I receive the error:
I already configured the settings.
Is it needed to have HTTPS instead of HTTP?
Hello @Claudiu_Anghelescu
Yes, you should use HTTPS, otherwise the browser will block the request for "Mixed content"
Thank you!
I've installed SSL certificate to use HTTPS and now it's working.
There is a way to keep authentication always open, maybe using a token?
The chart is visible only if I'm authenticated on the tenant, otherwise I receive the below message:
Hello @Claudiu_Anghelescu
If you've followed the example in this article, it is expected that you are redirected to your Identity Provider if you are not logged in yet when you open your site.
At this moment, it's not possible to provide an authentication token, but it is on the roadmap, stay tuned.
@Damien_V please let me know when you have the authentication token available, otherwise i should buy a aditional analyzer licence
@Damien_V i bought Sense Cloud Enterprise a few months ago and I want to know when will be released the authentication token feature
@manuelvallejos90 when you say authentication token what do you mean? Are you asking about JWT capabilities or OAuth2 or something else?
@Jeffrey_Goldberg I need to share sheets on my intranet to show others without asking to log in, that is what @Damien_V said it's on the roadmap
Hi,
Is there anyway that i can embed the charts from Qlik Sense Business to localhost app?