How to reflect the updated access token in Websocket communication.

RyoOowada
RyoOowada Newcomer
edited May 26 in Refinitiv Data Platform

How can we update the access token in the WebSocket session?

Based on the documentation, we believe that the latest access token can be updated in the WebSocket session by using the following request format:


{
"Domain": "Login",
"ID": 1,
"Key": {
"Elements": {
"ApplicationId": "555",
"AuthenticationToken": "aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"Position": "127.0.0.1"
},
"NameType": "AuthnToken"
}
}

Is it correct to assume that this request will update the access token for the WebSocket session?

Also, if the above request is made while the WebSocket session is ongoing, will the session continue without interruption?

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @RyoOowada

    After an application got a new access token from the RDP Authentication service, an application can send a new access token to the WebSocket Server to extend streaming connection via the following WebSocket JSON login message.

    {
    "Domain":"Login",
    "ID":1,
    "Key":{
    "Elements":{
    "ApplicationId":"App-ID",
    "AuthenticationToken":"new access token",
    "Position":"postion"
    },
    "NameType":"AuthnToken"
    },
    "Refresh": False
    }

    The Login message above is "almost identical" to the initial Login request, except the "Refresh" : False setting. This makes the WebSocket session continues without sending a Login Refresh Response message to a consumer side (except you need it).

Answers