Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
frankpacker
Contributor
Contributor

HTTP GET call to /qps/user endpoint does not deliver session cookie

Hi All,

I have a mashup that receives a Qlik ticket as a parameter in its URL. The ticket is issued via a server-side login form, and that portion of the process works fine.

The problem is that when the ticket is consumed by the mashup app by making an HTTP GET call to {server}/{virtual proxy}/qps/user?QlikTicket={received ticket} the session cookie is not delivered, and this action appears to kill the logged-in session on the Qlik server.

The expected response is received from making the GET request - the logged in user, directory etc is returned, but no cookie is set and immediately repeating the call with the same ticket returns the {session: "inactive"} response.

If I set the mashup to load a resource from the Qlik server with the ticket appended, the cookie is delivered and that works ok, but I need to be able do it via the HTTP GET call, not in HTML
 
I'm using Qlik Sense Enterprise November 2020 SR7
 
Code that's executed when the parameter is present in the URL for http call (Angular):
 
 

 

this.http.get<any>("https://{server}/{virual proxy}/qps/user?QlikTicket="+ticket).subscribe(data => {
        if(data.userId) {
            this.isLoggedin.next(true);  //informs the rest of the app that the session is live
        }
    })

 

Does anyone have any advice as to why the session cookie is not delivered, and the session on the Qlik server is completely destroyed?
 

 

Labels (4)
2 Replies
NadiaB
Support
Support

Hi @frankpacker 

Have you seen the following documentation already?

https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/Platform/Content/Sense_PlatformO...

 

When using a web browser, the web browser sends a ticket to the proxy. The proxy then returns a cookie to the browser and this cookie is included in the communication with the Qlik associative engine.

When using a custom client, the client must set the cookie and provide it to the proxy.

Kind Regards.

Note: if this suggestion helps to resolve the issue or answers your question, it will be appreciated if you select the "Accept as Solution" option.
We encourage you to visit our Knowledge Base https://qliksupport.force.com/QS_CoveoSearch when trying to find a solution related and not limited to: errors, feature requests, product defects. You can also visit our Qlik Help portal https://help.qlik.com/
andre_gas
Partner
Partner

Hi @frankpacker ,

I suggest you to verify the ticket using it in a browser calling the complete URL. Remember that ticket could be consumed only one time, so you should comment the QPS call in your script.

Another point to attention, I'm not an expert with JS, but it has a synchronous execution model. Maybe the JS engine execute the QPS call previously to have the ticket and variable ticket is empty at the get time.