For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1.4k 5 3 6

Websocket session with desktop session token

Hi Experts,

I'm using the example for setting up a websocket connection. All works fine when I'm using the token that was requested in that example or from a separate platform session. However it's not connecting passing token from the established desktop session.

The error message: "Text":"TREP authentication failed (1026, Request for token validation failed:Authentication server did not contain \"active\" in response)"

Thanks

Marcin

websocketsrdptoken
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
25.3k 87 12 25

Hi @marcin.bunkowski01

I have confirmed with the EDAPI team as follows:

Tokens used by the Data API Proxy to connect to the platform are neither supposed to be shared with the user nor used to establish other streaming connections (like RTO). Desktop sessions only support streaming connections opened through the Data API Proxy.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.3k 87 12 25

Hi @marcin.bunkowski01

Not sure I fully understand - what is the desktop session you are referring to and how do you establish this? How are you extracting the token.

Also, please confirm which 'example for websocket connection' you are using.

The only understanding I have of a Desktop session is where you connect with the RDP Library to Eikon or Workspace running on your desktop. If that is the case, you cannot take a token from your desktop session (which is sourcing its data from Eikon via the Eikon API proxy) and somehow pass that to the RTO service that requires its own authentication and login process.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1.4k 5 3 6

Hi @umer.nalla

Thanks for looking into it. The example is taken from git.

In the below example for auth_token I provide platform_session._access_token and it works but it fails with the desktop_session._access_token.

    def _send_login_request(self, auth_token, is_refresh_token):

        """
            Send login request with authentication token.
            Used both for the initial login and subsequent reissues to update the authentication token
        """
        login_json = {
            'ID': 1,
            'Domain': 'Login',
            'Key': {
                'NameType': 'AuthnToken',
                'Elements': {
                    'ApplicationId': '',
                    'Position': '',
                    'AuthenticationToken': ''
                }
            }
        }

        login_json['Key']['Elements']['ApplicationId'] = app_id
        login_json['Key']['Elements']['Position'] = position
        login_json['Key']['Elements']['AuthenticationToken'] = auth_token

        # If the token is a refresh token, this is not our first login attempt.
        if is_refresh_token:
            login_json['Refresh'] = False

        self.web_socket_app.send(json.dumps(login_json))
        print("SENT on " + self.session_name + ":")
        print(json.dumps(login_json, sort_keys=True, indent=2, separators=(',', ':')))
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
25.3k 87 12 25

Hi @marcin.bunkowski01

That example is getting its tokens from the RDP Authentication gateway and then passing that to Refinitiv Real-Time Optimised as part of the Login message - whereas your desktop session is with Eikon Data API Proxy.

So, as mentioned previously, I don't see how your Desktop token can be used as part of the Login message to the RTO service - it is no doubt tied to the RDP Auth gateway.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1.4k 5 3 6

Thanks @umer.nalla now this is clear.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.