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
-
Hi @Habib.Ahsan
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
- 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
- 685 Datastream
- 1.4K DSS
- 616 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
- 252 ETA
- 557 WebSocket API
- 38 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
- 653 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 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 中文论坛