Refinitiv Data Platform APIs - error when requesting data
I have my EDP login credentials and clientid/app key generated. Now I am running the first basic python script , but getting an error message. Seems like I get the token, but data request is failing, an someone please advise on what I may be missing:
c:\data\RDP\dev\sampleCode\IPA\python\samples>python timeSeries.py
Getting OAuth access token...
Reading the token from: token.txt
Token expired, refreshing a new one...
Requesting from TOKEN_ENDPOINT: https://api.refinitiv.com/auth/oauth2/v1/token
Saving the new token
Invoking data request
Unable to get data. Code 403, Message: {"error":{"id":"518d753f-fefb-4b9a-b93d-352424c96c39","code":"insufficient_scope","message":"access denied. Scopes required to access the resource [trapi.data.historical-pricing.summaries.read]","status":"Forbidden"}}
Best Answer
-
Your curl request was incorrect. Use this:
curl -v -X POST -H "Accept: application/json" -d "username=*****&password=*******&client_id=*****&grant_type=password&scope=trapi&takeExclusiveSignOnControl=true" https://api.refinitiv.com/auth/oauth2/v1/token
0
Answers
-
The error means, that you do not have permissions to run time series API call. Please contact your account manager to get this added. Alternatively, you can try an use the RDP services for which you do have permissions. See the scope parameter provided to you with the access token.
You can read about token scopes in the introductory tutorial Authorization - All about tokens.
0 -
Hi @Habib.Ahsan
If this is for yourself and not on behalf of a customer, then you can raise a 'Service Now' ticket for 'Internal Ordering Request for Eikon, Elektron' and ask them to add this scope/licence to your MachineID.
0 -
Thank you both @Umer.Nalla and @Gurpreet. I have opened an OMS request to fix the permission issues.
Another interesting thing that came up while running the code in introductory tutorial on ARM-CFS authentication, I cannot run the token request using the curl script , I get 404 Page Not Found error:
But I can get a a new token when I run the python script - see attached file . I don't understand why the same endpoint would return two different responses with same credentials. I'd appreciate any guidance.
sampleTokenRequest.txt
0 -
@Habib.Ahsan, Please do not post your password here!! This is a public forum. I have removed your information, so please upload it again - after masking the values!!
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 中文论坛