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: 
_AnonymousUser
Specialist III
Specialist III

tFileFetch with JSON body as authentification to get token from cookie

Hello,

i am working on a problem to get a access token for an API. I need to send a http post with Header Information (application json) and  a JSON as body in form of:
{"email":"abc@mail.com","password":"secret"}  to an API to get an session cookie and access to the API. I successfully connected to it via tRest with the above in the body (escaped the ") but then I couldn't get the information from the cookie (but there is the access_token). so I tried to connect via tFilefetch to save the cookie and read it again but I could not get the html body information in there and always got a 400 bad request back. I only would need to get the access token from the request from the cookie to then call another API action (tRest) with the access token in the header. 

Any idea how to get this done? Thx!

Labels (2)
1 Reply
Anonymous
Not applicable

Hi,
Is it a rest web service?
Have you tried to use trestclient component to  get a access token for an API to see if it works?
Best regards
Sabrina