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?


Best Answer

  • NirajKumar2
    Answer ✓

    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

Answers

  • 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.