Qlik Community

Ask a Question

Qlik Fix

Here you'll find the recordings of our Qlik Fix video series.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW

Qlik Fix: How to Generate API Keys with APIs in Qlik Sense Enterprise SaaS

Troy_Raney
Digital Support
Digital Support

Qlik Fix: How to Generate API Keys with APIs in Qlik Sense Enterprise SaaS

Hammer Up 1000x340.png

This video is part of the Qlik Fix Video series. If you found this video useful, check out the other Qlik Fix Videos.

This video demonstrates how to generate API Keys in Qlik Sense Enterprise SaaS using APIs.

Here is a link to more information in the Support Knowledge Base:

Article - How to Generate API Keys with APIs in Qlik Sense Enterprise SaaS

Qlik.Dev: Generate Your First API Key

Help.Qlik.Com: API Key Documentation

Attached is a downloadable .mp4 video file for those who cannot view YouTube videos.

#QlikSupport

Video Transcript:

 

Hi and welcome to Qlik Fix.
This video will demonstrate how to setup API Keys in Qlik Sense Enterprise SaaS using APIs.

For this example, I’ll be using PowerShell to send requests to a Qlik Sense Enterprise tenant.
These will be the same actions that could be performed via the user interface in the Hub,
but will be done via APIs instead.
Here is a simple script that will allow you to generate an API key.
More details can be found on Qlik.Dev, under Tutorials, and Generate Your First API Key.
But I’ll show you how to find the same commands using browser developer tools.

First, in the tenant Management Console, under Integration,
API Keys should be enabled here.
You can find more information about this step on Qlik.Dev.
The link is below.
Set the max token expiration in days, and the number of API keys per user.
These settings help maintain system security.

To generate an API key,
From the Hub, in the profile menu, select Settings.
Then API Keys.
To see the API code to use, you can open Browser Developer tools in Chrome via F12 or
In the browser menu under more tools and Developer Tools.
Click on the Network tab.
Then perform the action of getting a new API key by clicking the Generate New Key button.
Give it a name, generate.
Here’s the key.
Now in the dev tools, the request for that command is shown.
You can copy that.
And pasting it here in the Powershell script, you can see that nothing has changed. So it’s the same script found in the tutorial on Qlik.Dev.
Scrolling a little further down in the body, you can see name and expiry time.
Run the command,
And here is the current API key that’s about to expire,
And here is the new API key.
you would need to run this command before the API Key expires to get a new Key
and update your code with the newer API Key.
This is a handy method for renewing API keys that are about to expire, because you only need to visit the user interface the first time.

To demonstrate what it looks like when something goes wrong,
I’ll use the wrong format in the Expiry field.
First, it’s showing that the maximum number of API keys has been reached.
To resolve that issue, I will delete an expired API key.
Back to PowerShell and try again.
This time, an “Invalid Property Value – 400” Error is given.
That’s just showing that the wrong format is being used. And you can always find the correct code to be used by performing the action in the UI and copying the code from the developer tools.

I hope this helped.

If you'd like more information
Search for answers using the Unified Search
tool on the Support Portal.
It searches across the Support Knowledge Base,
Qlik Community, Qlik Help site and Qlik YouTube channels.
Take advantage of the expertise of peers, product experts and technical support engineers
by asking a question in a Qlik product forum on Qlik Community
And don't forget to subscribe to the Support Updates Blog.
Thanks for watching!

Nailed it!

Attachments
Version history
Revision #:
1 of 1
Last update:
‎2020-11-06 03:12 AM
Updated by:
 
Contributors