Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
_Johan
Partner - Contributor III
Partner - Contributor III

Creating new oauth client through api

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

Labels (4)
1 Solution

Accepted Solutions
Marc
Employee
Employee

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.

Marc_0-1717119362897.png

Marc_1-1717119407263.png

 

 

View solution in original post

1 Reply
Marc
Employee
Employee

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.

Marc_0-1717119362897.png

Marc_1-1717119407263.png