Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm using the Engine Api, with websocket and the jwt authentication.
When I use the ExportData method on an object, I get the url of the exported file, but when I try to get this file through the "code"it returns the login page. If I try with the browser I can download the file.
Can I download the file through the websocket session, that is authenticated? Or another solution?
Thank You
S.
To do that, you'll need to pass the session token of the websocket as a cookie in your http request. Are you using .Net? In that case I can show you how to do it. In fact, there is another thread on that topic here:Using a Session Cookie with Repository API
If you're in the javascript world, then others are better suited to help you...
Unfortunately, you can't download that file through a websocket. You need to do an HTTP GET to download it.
Hi Øystein,
thank you for your answer.
But, I need to renew the auth to the https endpoint, or I can pass the session of the websocket
Thanks
To do that, you'll need to pass the session token of the websocket as a cookie in your http request. Are you using .Net? In that case I can show you how to do it. In fact, there is another thread on that topic here:Using a Session Cookie with Repository API
If you're in the javascript world, then others are better suited to help you...
Thank you for the hint
At the moment I'm working on a prototype with Python, but I take a look at the .net solution.