Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mr_vince
Contributor
Contributor

grant_type not supported for REST POST

Hi there!

I'm working with Qlik  Sense on connecting a Learning Management System with Qlik to retrieve learner data. So far, so good. But the connection is OAuth token based, which requires me to create and send a new token every time.

I found out how to, theoretically, POST my credentials for obtaining a new token and later use the token for my GET requests in creating different connections.

So I set up a new connection, added my request URL, set the method to POST, added my request body and set the content-type of the header to application/x-www-form-urlencoded

 

Unfortunately, after adding all my credentials and needed information to request body of the POST request, it shows me  

"HTTP protocol error 400 (Bad Request): {"error":"unsupported_grant_type","error_description":"Grant type not supported"}"

all the time. 

 

I tried sending the same request via Postman and got the wished for outcome, the Token. But I'm almost losing my mind as I can't figure out what else I need to set up or what I'm missing here. I tried out different formats in sending the body as well, but got "grant_type not specified" before. 

 

This is my structure of the body request:

request body.png

This is the header I'm sending:

Query headers.png

 

I very much appreciate some help 🙂

Labels (2)
4 Replies
viliam_vacula
Contributor II
Contributor II

Hello,

any solution to this? We are facing EXACTLY the same problem.

Thanks.

kp_varian
Contributor
Contributor

Hello,

Can you share the solution on this? 

Much appreciated.

Thanks

mr_vince
Contributor
Contributor
Author

Unfortunately there was no way in making this happen in the Qlik connector. I ended up writing a python script with the credentials that is creating the token and saving the token on a given location as CSV. The python script runs every hour via an external service and I just pick up the token from the CSV and use it as a variable in my Qlik script

Brian_Robertson
Partner - Contributor
Partner - Contributor

I was faced with the same challenge, got it to work with & as a separator.

Try this:

grant_type=password&username=APIXXXXXXX&password=12345&client_ID=customerAPI