How to use rdp.session.platform.Definition with RDP Password in refinitiv-data v1.6.2?

Hi Refinitiv Developer Community,
I'm trying to authenticate to the Refinitiv Data Platform using the refinitiv-data Python library, specifically version 1.6.2. My environment is Python 3.12 running on Ubuntu.
My goal is to establish a platform session using my RDP credentials (App Key, RDP Username [which is a Machine ID like GE-A-00220069-3--...], and Password Machine for ID).
I'm attempting to use the rdp.session.platform.Definition class to configure the session and then open it with rdp.open_session(config=...), similar to the structure below:
import refinitiv.data as rdp
import traceback
import sys
RDP_APP_KEY = "YOUR_APP_KEY_PLACEHOLDER"
RDP_USERNAME = "YOUR_MACHINE_ID" # e.g., GE-A-00220069-3--...
RDP_PASSWORD = "YOUR_RDP_PASSWORD_PLACEHOLDER"
try:
print("Defining RDP platform session configuration...")
# --- Attempting to configure platform session --- # Trying different parameter combinations here causes TypeErrors session_definition = rdp.session.platform.Definition( app_key=RDP_APP_KEY, # What are the correct parameter names here for v1.6.2? # Attempts: # 1. username=RDP_USERNAME, password=RDP_PASSWORD # => TypeError: ... got an unexpected keyword argument 'username' # 2. rdp_signon_username=RDP_USERNAME, rdp_password=RDP_PASSWORD # => TypeError: ... got an unexpected keyword argument 'rdp_signon_username' # 3. Also tried adding sign_on_control=True (combined with above) # => TypeError: ... got an unexpected keyword argument 'sign_on_control' # Need the correct parameter names below: parameter_name_for_username = RDP_USERNAME, parameter_name_for_password = RDP_PASSWORD ) print("Opening Refinitiv Data Platform session using definition...") rdp.open_session(config=session_definition) print("Session opening process initiated...") # ... rest of the code to use the session ...
except rdp.errors.SessionError as session_error:
# Note: Based on previous errors, SessionError might also not be the correct base class in v1.6.2
print(f"Session Error: {session_error}", file=sys.stderr)
traceback.print_exc()
except Exception as e: # This catches the TypeError etc.
print(f"An unexpected error occurred during setup or execution: {e}", file=sys.stderr)
traceback.print_exc()
finally:
try:
print("Closing session...")
rdp.close_session()
except Exception as close_session_err:
print(f"Error closing session: {close_session_err}", file=sys.stderr)
print("Cleanup finished.")
As noted in the code comments, I've tried various keyword arguments like username, password, rdp_signon_username, rdp_password, and sign_on_control, but they all result in a TypeError: Definition.init() got an unexpected keyword argument '...'.
Could someone please advise on the correct keyword arguments required by rdp.session.platform.Definition in refinitiv-data version 1.6.2 when authenticating with an App Key and RDP Username/Password? Or is there a different preferred method for this authentication type in v1.6.2?
Any help or pointers to the relevant v1.6.2 documentation would be greatly appreciated!
Thanks,
Ian
Answers
-
Hello @ianzhu
Please use the latest LD Library for Python. You can see the example of creating the platform session in the provided samples.
import refinitiv.data as rd session = rd.session.platform.Definition( app_key = RDP_APP_KEY, grant = rd.session.platform.GrantPassword( username = RDP_USERNAME, password = RDP_PASSWORD, ), signon_control=True, ).get_session() session.open()
1 -
The code looks like this:
session = ld.session.platform.Definition( app_key = 'APP_KEY', grant = ld.session.platform.ClientCredentials("<CLIENT_ID>", "<CLIENT_SECRET>") ).get_session() session.open()
The format of CLIENT_ID is GE-XXX.
0 -
Thanks @But mine is RDP V2, and it seems I don’t see a client ID or password.
How can I obtain the client ID for V2 account?
My other RDP V1 account does have a machine ID and password.0 -
Typically, RDP V2 is used to connect to Real-Time Optimized service.
Please check this Account authorization V1 to V2 migration cheat sheet article.
For internal accounts, you may need to request an account from the service now.
For client's accounts, please contact the client's LSEG account team or sales team.
2 -
Thank you. I am testing the RDP connection using Python on my own.
It seems I need to request the CLIENT_ID and CLIENT_SECRET through ServiceNow.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛