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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik_helo
Contributor
Contributor

Qlik cloud - websocket connection failed

Hi ,

i am trying to connect qlik cloud app with generated api key. My post man request is successful.

qlik_helo_0-1670837298923.png

 

 

public connect = async () => {
  const { host, appId, webIntegrationId } = configuration;
  let url = `wss://${host}/app/${appId}`
 
  console.log(url);
  // const enigmaGlobal = await enigma
  //   .create({
  //     schema,
  //     url,
  //   })
  //   .open();

  // return enigmaGlobal.openDoc(configuration.appId);

  const config = {
    schema,
    url: url,
    createSocket: (url:any) => new WebSocket(url),
  };
  const session = enigma.create(config);
  session.open();
}

 

 

Question:
1. How do i pass api key here, websocket doesn't support any auth headers?
2. Connection failed with websocket.

qlik_helo_1-1670837551720.png

 

 

Labels (3)
1 Solution

Accepted Solutions
Eugene_Sleator
Support
Support

Hi @qlik_helo  please refer to the articles below. 

As your websocket should be constructed similar to this 

/app/${appId}?qlik-web-integration-id=${webIntegrationId}&qlik-csrf-token=${csrfToken}`;


Qlik Saas blocking websocket connections from origins not the tenant 

Build-a-simple-web-app 

Hope this helps. 




View solution in original post

1 Reply
Eugene_Sleator
Support
Support

Hi @qlik_helo  please refer to the articles below. 

As your websocket should be constructed similar to this 

/app/${appId}?qlik-web-integration-id=${webIntegrationId}&qlik-csrf-token=${csrfToken}`;


Qlik Saas blocking websocket connections from origins not the tenant 

Build-a-simple-web-app 

Hope this helps.