Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
We want to fully integrate Qlik tenant onboarding without platform. Right now it is possible to create a new tenant using OAuth Client. However, when we need to manage the tenant, we need an API Key. It is possible to create API Key through REST API but how do you authenticate yourself for the POST request if it is the first time you create the API Key through REST.
The goal here is to create an API Key without ever going to Qlik Management Console.
Thank you!
Hi @linnakry
Not sure if this is what you're after but you can request an access token for the oath client. Once you have the access token you can use it to authenticate against the API used to create an API key, using the Authorization:Bearer <token> header.
In the POST request you also include the subject for the API key, eg the user which will be "tied" to the key. The sub field should be in the format auth0|<uuid> matching an existing user in your tenant.
Also make sure to set the subType=user in the POST request.
https://qlik.dev/apis/rest/api-keys/#%23%2Fentries%2Fv1%2Fapi-keys-post
Hope this helps.
Best
Björn
Hi Björn,
do you mean OAuth2 here?
to create this OAuth2, you need an interaction with Qlik Platform to create client id and secret. Is there a way to be able to create this without using Qlik Platform?
Thank you.
Hi @linnakry
To my knowledge there is no way to create regional level OAuth clients programmatically, but I might be wrong. Unfortunately I don't have access to a subscription with multi tenant entitlement at this point to try it out.
Someone else might have other insights to share on the subject.
Best
Björn
@linnakry could you help me understand why you need an API key for the tenant? If you have already created the tenant programmatically, then it means you have a regional OAuth credential (see here for context), which you can continue to use to manage any tenant you create in that region.
You also have the option of creating a new API key for the bot user who created the tenant, but this is unnecessary unless you require it for security reasons.