question

Upvotes
Accepted
21 0 0 1

Why I am getting failed to request a new token error in RDP platform session?

I am getting the following error while calling the IPA API:

Token requested error {'error ': 'invalid grant'}

Failed refresh an authentication token while requesting.


I am using the RDP platform method to open the session:


session = rdp.PlatformSession(

APP_KEY,

rdp.GrantPassword(

username = RDP_LOGIN,

password = RDP_PASSWORD

)

)

session.open()

print('Session Status: ', session.get_open_state())


and in this method token is not required then why I am getting the token error?


rdp-apirefinitiv-data-platform
icon clock
10 |1500

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

Upvotes
Accepted
21 0 0 1

I was able to fix this issue by downgrading the Refinitiv data platform package with the following command

pip install refinitiv-dataplatform==1.0.0a7.post1

The latest release of refinitiv-dataplatform==1.0.0a7.post7 was causing the issue.

you can check the version with the following command

pip show refinitiv-dataplatform

icon clock
10 |1500

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

Upvotes
11.5k 16 7 10

Hello @NirajKumar2

Could you please clarify my understanding?

  1. You success initialize the session
  2. but the IPA function call return {'error ': 'invalid grant'}

What is the version of Python and RDP Library for Python that you are using?

If you still encounter the problem, please enable the logging and share the log file. You can find how to enable the log in this post.


icon clock
10 |1500

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

Click below to post an Idea Post Idea