Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
After creating a new tenant through api how do I setup the oauth2 m2m impersonation client through api?
Is there a trick or do I have to make the one I have published and shared between all tenants?
Kind regards
Johan
you would need to call the Post /v1/oauth-clients api.
https://qlik.dev/apis/rest/oauth-clients/#%23%2Fentries%2Fv1%2Foauth-clients-post
{
"appType": "web",
"clientName": "Test",
"allowedScopes": [
"user_default",
"admin_classic",
"<other relevant permissions>"
],
"redirectUris": [
"http://127.0.0.1/callback"
],
"allowedGrantTypes": [
"client_credentials",
"urn:qlik:oauth:user-impersonation"
]
}
NB: if in doubt, open the dev tools in your browser, and perform the creation steps in the UI. the UI uses the same rest apis, so you can inspect what happens and replicate in your code.
you would need to call the Post /v1/oauth-clients api.
https://qlik.dev/apis/rest/oauth-clients/#%23%2Fentries%2Fv1%2Foauth-clients-post
{
"appType": "web",
"clientName": "Test",
"allowedScopes": [
"user_default",
"admin_classic",
"<other relevant permissions>"
],
"redirectUris": [
"http://127.0.0.1/callback"
],
"allowedGrantTypes": [
"client_credentials",
"urn:qlik:oauth:user-impersonation"
]
}
NB: if in doubt, open the dev tools in your browser, and perform the creation steps in the UI. the UI uses the same rest apis, so you can inspect what happens and replicate in your code.