Why am I getting an error when I run the exact same code in my stand-alone python environment, whil
Asking on behalf of a client:
"I can access the data (end-of-day prices for EA.O) using the RDP API in the Codebook application in Workspace. Data comes back nice and tidy as per the request.
When I run the exact same code in my stand-alone python environment I get the error message below. It seems that I’m allowed access to the data via the API while in the WS Codebook app, but not via the API accessing it via my Python code.
Would it be possible to have the same rights using the API from my stand-alone code as in the WS Codebook app?
API error message:
Error for RIC EA.O:{'id': 'bf0701ae-c643-4f7b-b6bb-18133ebc77a0', 'code': 'insufficient_scope', 'message': 'access denied. Scopes required to access the resource: [trapi.data.historical-pricing.summaries.read]. Missing scopes: [trapi.data.historical-pricing.summaries.read]', 'status': 'Forbidden'}
Thank you for your assistance."
More information:
- Issue started yesterday. This is the first time I’ve used the refinitiv.dataplatform library in a stand-alone application, I’ve only used it in CodeBook in Workspaces before where it has worked every time.
- It happens every time I run the stand-alone application.
- Tried another RIC “ERICb.ST” with the same error message about insufficient_scope.
- Versions:
- Python 3.7.10
- Eikon 1.1.2
- Refinitiv 1.0.0a7.post7
Best Answer
-
Hello @arki.atienza
Based on my test, the Codebook uses my Workspace/Eikon credential which has different permission than the dedicated RDP credential.
1
Answers
-
RDP Library can be used with Eikon/Refinitiv Workspace credentials as well as with RDP credentials. The latter is aimed at enterprise applications. In the case of Eikon/Refinitiv Workspace you're using a desktop session in RDP Library, whereby all data requests flow through Eikon/Refinitiv Workspace desktop application and which therefore has a runtime dependency on Eikon/Refinitiv Workspace desktop application. With RDP credentials you're using platform session in RDP Library. If you're using a desktop session you should have the exact same entitlements and similar experience between running the code in Codebook vs. running it in a Python interpreter on the machine alongside Eikon/Refinitiv Workspace. If you're using a platform session and different credentials from your Eikon/Refinitiv Workspace account, then it's expected that the entitlements may not be the same between these accounts. Are you using a desktop session, i.e. are you establishing a session using
import refinitiv.dataplatform as rdp
rdp.open_desktop_session('MY_APP_KEY')or are you using a platform session, which you establish using
import refinitiv.dataplatform as rdp
rdp.open_platform_session(APP_KEY,
rdp.GrantPassword(username = RDP_LOGIN,
password = RDP_PASSWORD ))1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛