v2 authentication for RDP Historical pricing API

I tried to run “timeSeries.py” from https://developers.lseg.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis/download – authentication method used is “v2” with my CLIENT_ID and CLIENT_SECRET.

1729880010935.jpeg

Initial run went well – I got the data as expected:

1729880034686.jpeg

However, when I try again after the token from “token.txt” is expired, I get this error:

1729880058956.jpeg

It continues to work well if I run it after manually deleting the file “token.txt”

Answers

  • Hello @ganapathy.phatak01,

    There are no log-images in your question. In general, the v2 authentication is used for real time streaming data requests (RTO) as of yet. This isn't officially available for other RDP endpoints yet - even though some endpoints might work.

  • Upon further investigation I found that the response structure of the token json message has changed for v2 authentication from last time when these samples were updated. Now, the response does not have include a refresh token. I'll followup with the RDP gateway team and update the code accordingly.

  • Hi @Gurpreet ,

    Changing this line within "getToken()" function of "rdp Token.py" fixed the issue for me:

    Change from: tknObject = _requestNewToken(tknObject["refresh_token"])

    Change to: tknObject = _requestNewToken("refresh_token")

  • This would fix the issue for v2 authentication, but we still need to find out why refresh token are no longer being provided. Is the expectation that an app will use client credentials every time?