Sharing embed codes for anonymous access
After anonymous access has been turned on for an app, an embed code is made available in Qlik Cloud. This embed code contains an access code that automatically authenticates external users against the Qlik Cloud tenant, allowing them to consume app content without logging in.
For more information about anonymous access, including requirements and permissions, see Sharing app content with anonymous access.
Using embed codes
The integration of Qlik Sense app content into an external web site or application is known as a mashup. You use qlik-embed to integrate the app content from an anonymous access tenant into your mashup. The embed code that you generate in Qlik Cloud is used to provide authentication for consumers of the mashup.
App content from an anonymous access tenant can be embedded as any of the following:
-
An entire app (that is, all sheets in the app)
-
One or more sheets
- One or more individual visualizations
The following references on the Qlik Cloud developer portal can help you with using qlik-embed for anonymous access:
-
Anonymous Access with qlik-embed : Quick start tutorial that guides you through the process of sharing content on public websites with Qlik Anonymous Access.
-
Create an anonymous OAuth2 client: Tutorial guiding you the process of creating an OAuth client to use to provide anonymous access to content. For further information, see Creating an OAuth client for anonymous embedding of app content.
-
qlik-embed: Home page for qlik-embed.
-
Auth overview: Overview of how authentication works with qlik-embed.
Structure of embed codes
The embed code contains an access code that provides authentication for anonymous users. This access code is shared between the app link and the embed code.
Creating an OAuth client for anonymous embedding of app content
To embed app content for anonymous access using qlik-embed, you need to create an OAuth client with a type specifically designed for this use case.
Do the following:
-
In the Administration activity center, go to the OAuth section.
-
Click Create new.
-
In the Client type dropdown menu, select Anonymous embed.
-
Enter a Name and optionally a Description for the OAuth client.
-
Under Allowed origins, enter each origin that you need to authorize. These are the domains that will be accessing the Qlik Cloud tenant to retrieve the information for the embedded analytics.
Click Add after inserting each URL.
-
When you are done, click Create.
-
Click Copy to clipboard to save the client ID for later use. It will be needed when the app content is embedded with qlik-embed.
-
Click Done.
Copying an embed code for an app
After anonymous access is turned on for an app, you can copy the embed code from the sharing dialog for the app. To do this, you need the Owner or Can manage role in the app's space, as well as a value of Allowed for Public link creation.
Do the following:
- Activate anonymous access for the app. See Turning anonymous access on and off.
-
Click Share. The sharing dialog opens.
-
In the section Anyone with the link, click to open the settings.
-
Under Embed code, click to copy the code.
You can now use the embed code in your web content to allow anonymous access to the analytics.
Resetting the access code
You can reset the access code if needed. For more information, see Resetting the access code.