refinitiv.data not able to retrieve RDP access token (Error code 401)
Hello,
Recently I received Refinitiv Workspace and am using it instead of the old Eikon application. I am using the eikon and refinitiv.data API via Python. The eikon API works without any issue, however when I try to retrieve data using refinitiv.data I receive the error code 401 with the following message:
When opening a session using
import refinitiv.data as rd
rd.open_session()
I receive the output
<refinitiv.data.session.Definition object at 0x1c21cad3910 {name='workspace'}>
The _config_defaults.py looks like this:
I am actively running Refinitiv Workspace on my computer. The same issues arise when closing Refinitiv Workspace and logging into the Eikon application. The eikon API works in both cases.
Any help would be greatly appreciated!
Best Answer
-
Hi @benedikt-luka.antic ,
There is another question in the portal with the same issue and this is perhaps related to the Workspace App itself. I have already raised Product issue case with number 13094529.
You should have already received an email, please update us here with the progress.
Best regards,
Haykaz
0
Answers
-
Do you receive this error after rd.open_session()? Please note that in RD you don't necessarily need to set up the config (If you want to use via config you need to provide your actual APP key under app-key field of the json) and pass the API key. When running rd.open_session() it will automatically pick up your APP key from Workspace desktop app running in the background.
Best regards,
Haykaz
0 -
Hi @aramyan.h,
No, when running rd.open_session() I receive the following, in my opinion 'normal', output
<refinitiv.data.session.Definition object at 0x1c21cad3910 {name='workspace'}>
Only when I then try to retrieve data do I receive the error outlined above after a couple of moments.
0 -
Thanks @benedikt-luka.antic , can you please also share the code you are using which produces the error?
0 -
data = rd.discovery.search(
view=rd.discovery.Views.GOV_CORP_INSTRUMENTS,
top=10000,
filter=f"(DbType eq 'CORP' and RCSAssetCategory eq 'A:J' and IsActive eq true and (RCSFIClassificationCodes((Type eq 'ICMA') and (Code in ('IGBP' 'ISTP' 'ISBP' 'ISLP' 'ICTG'))) and IsESGBond eq true and FaceIssuedTotal gt 250000000 and (RCSCurrencyLeaf eq 'Euro' or RCSCurrencyLeaf eq 'US Dollar') and {sector_filter} {additional_sector_filter}))",
select="RIC,EJVAssetID,DTSubjectName,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,DBSTicker,CouponRate,MaturityDate,IssueDate,ISIN,RCSCurrencyLeaf,RCSCountryLeaf,DbTypeDescription,InstrumentTypeDescription,RCSCouponTypeGenealogy,FaceIssuedUSD,RCSBondGradeLeaf,RCSFIClassificationCodes,IsESGBond,FaceIssuedTotal,RCSTRBC2012Leaf,RCSTRBC2012Genealogy",
)
sector_filter and additional_sector_filter are of course chosen accordingly beforehand. For testing purposes one could set:sector_filter = "RCSTRBC2012Genealogy in ('B:262')"
additional_sector_filter = ''0 -
Of course beforehand I execute
import refinitiv.data as rd
rd.open_session()0 -
Hi @benedikt-luka.antic ,
Can you run other rd function, for example?
rd.get_data('AAPL.O')
Please also try if you have access in Search via our API Playground - API Playground (refinitiv.com).
And finally please post here what version of httpx are you using?
Best regards,
Haykaz
0 -
When I run
rd.get_data('AAPL.O')
I get the following error:
I have tried the API Playground and indeed have access in Search (as stated earlier these data requests were working without any issues until the recent installation of Refinitiv Workspace).
I am using the httpx version 0.24.1
0 -
Thanks, I have already asked the team to check. May also ask you to run logs enabled and send me the logs in text file
import refinitiv.data as rd
rd.get_config().set_param(
param=f"logs.transports.console.enabled", value=True
)
session = rd.open_session()
session.set_log_level("DEBUG")
rd.get_data('AAPL.O')Best regards,
Haykaz
0 -
After launching LSEG Workspace, can you open a browser and try the following:
http://localhost:9000/ping?all
Your output should look something like this:
I'm looking to see if your account provides you with API access.
0 -
When I try to run this code, I receive the logs contained in the following text file: rd_logs.txt
(Twice an unexpected error occurred, which crashed my Refinitiv Workspace application, after I ran the code. I was not able to capture the error output, after I tried to reproduce it. It does not crash the application anymore.)0 -
Hi,
sadly the group policy at my work stops me from accessing http://localhost:9000/ping?all
0 -
But since all data requests have been working without trouble until recently and nothing regarding my actual account permissions etc. has changed, I would assume I still have API access.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛