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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvote
Accepted
16 1 1 3

"Authentication failed (1026, Request for token validation failed:Authentication server did not contain \"active\" in response)."

RTO - Authentication Issue.txt

Hi DevAdvocates,

Would you kindly advise what the possible cause of the following error is?

"Text": "Authentication failed (1026, Request for token validation failed:"The authentication server did not contain "active" in response."

For context, the client is using the RTO data feed service and running the Python program 'market_price_rdpgw_service_discovery'. He is requesting real-time data and storing it in a .csv file for further use. Data is being fetched on a real-time basis. However, the authentication error message pops up about 11-12 minutes after initiation of 'market_price_rdpgw_service_discovery'. This error comes up only sometimes and not always. Please refer to the attached console log for more details. Console log file points to another issue: When fetching the real-time data through 'market_price_rdpgw_service_discovery', He is also updating the .csv file for the latest BID and ASK Prices. However, if we check the console log file or the .csv file where the real-time data is getting updated, the field 'VALUE_TS1' does not get updated on a real-time basis and points to a time which is about 5-7 mins old.

His use case is to run this .py file continuously throughout the day and update the .csv file with the real-time RICs: FX Spots and Forwards feed.

Kind regards,

Vanessa

#technologyapiwebsocketsrefinitiv-realtime-optimised
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.

@vanessa.domo

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvote
Accepted
24.7k 54 17 14

Hello @vanessa.domo

Thank you for contacting us. The "1026, Request for token validation failed:Authentication server did not contain \"active\" in response." error message is generated from the RTO WebSocket server when it receives an expired/invalid Access Token in the WebSocket JSON login request message from the application.

Does the client use a single machine ID to run multiple applications/sessions? If they are using a single Machine ID with multiple sessions, the applications may encounter an error when an access token expires or when the applications attempt to refresh an access token. I highly recommend the client gets multiple Machine-IDs if they want to run multiple applications/sessions.

I also suggest you submit a support ticket to the RTO support team directly to verify the issue on the server side. The client can submit a ticket to the team via https://my.refinitiv.com/content/mytr/en/signin.html website.


rto-service-support.png


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 0 0 1

Hi @wasin.w ,

I'm currently facing this issue, and @vanessa.domo helped to post the question on the forum as I'm still familiarizing myself with the Refinitiv systems.


Yes, I currently have only one machine ID, but I'm running only one application instance.


You've also mentioned that this error could result from receiving an invalid or expired token in the WebSocket JSON login. Is there any coding hack to re-request an Access token? Maybe put it in a while loop until I receive a valid or non-expired Access token?

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
24.7k 54 17 14

Hello @raghav01

The market_price_rdpgw_service_discovery.py file uses the RTO/RDP V1 authentication which contains the following authentication information:

  • A short-lived Access Token: This token is used in the WebSocket login request message.
  • A long-lived Refresh Token: This token is only used to get new Access and Refresh tokens after the old one has expired.
  • expires_in: Access token validity time in seconds

The market_price_rdpgw_service_discovery.py example code runs for 90% of the expires_in time, then re-login to the RDP to get the new access token and re-send the new access token to the WebSocket server. You can find the code logic on lines #568 to #585 of the source code.

Additionally, please be informed that the WebSocket API examples on GitHub are provided "as is" and they are aimed to demonstrate the API workflow only. They are not optimized for any production uses.

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.