Skip to content

Generate your first API key

Overview

In this tutorial, you are going to learn how to generate an API key for your account in a Qlik Cloud tenant.

Important: An API key represents a token which provides access to Qlik Cloud with the same permissions as of the creating user. It is not possible to apply scopes to an API key. Consider using OAuth2 for auth if you require fine grain control.

Configure API key settings

Note: You must have the Tenant Admin role in the tenant management console to perform this section of the tutorial.

Inside the management console, click the Settings menu item on the left side of the screen.

a screenshot of the settings button in Qlik Sense
SaaS management console

Scroll down to the API keys section in the main part of the screen. Flip the switch to turn on API keys for the tenant, set the allowed maximum token age, and set the maximum number of active API keys a user may have in the tenant.

a screenshot of the API keys section of the
Settings in the tenant management console

Another requirement for generating API keys is for a user to have the developer role. In the management console menu, click Users to open the Users section and select ‘Edit roles’ from the ellipsis menu for the user you want to add the developer role to.

a screenshot of the selected user sub menu in the
Users panel the tenant management console

Check the box next to Developer to give the user developer privileges in your tenant. Save the change.

a screenshot of the edit roles modal for a user
entry in the tenant management console

Now that API keys are turned on in the tenant and the user has the developer role, have the user log in to your tenant and click the avatar in the upper-right corner of the screen. Click the API keys menu item. This action displays the API keys list for the user. Click the Generate new key button to create a new API key.

a screenshot of the API keys list
in the user's settings screen

Give the new API key a name and set the expiration time from the drop-down list. Click the Generate button to generate the API key.

a screenshot of the generate new key
configuration screen.

The generated API key appears. Copy it using any of the copy buttons and paste it somewhere safe.

Note: The API key is only displayed once, when you create it. If you don’t copy it, you won’t be able to see this specific API key again and will need to generate a new key.

a screenshot of the generated key in the generate new
key configuration screen.

Take the copy of the key and use it in Postman by setting an Authorization header to use a Bearer token. Paste the key in the text box that appears once Bearer is selected. Add a URL for a REST endpoint on the tenant. In this example, the URL is pointing to https://<tenant hostname>/api/v1/users/me. Click the Send button to make the request to the API endpoint. If you entered the information into Postman correctly, the response below appears.

a screenshot of Postman REST application testing
the generated API key.

Next steps

So you have an API key, now what? You can have a look at the REST API reference on qlik.dev and try the APIs out in Postman, or install qlik-cli and add your API key and harness the power of Qlik from the command line.

Was this page helpful?