how do I request ESG data from java

I have got my session token (RDP Token), is any java sample to request ESG data e.g. https://api.refinitiv.com/data/environmental-social-governance/v1/views/basic?universe=IBM.N
StringBuilder url = new StringBuilder("https://api.refinitiv.com/data/environmental-social-governance/v1/views/basic?universe=IBM.N");
HttpGet request = new HttpGet(url.toString());
request.addHeader("Authorization", "Bearer " + sessionToken);
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse httpResponse = httpClient.execute(request);
BufferedReader reader = new BufferedReader(new InputStreamReader(
httpResponse.getEntity().getContent()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = reader.readLine()) != null) {
response.append(inputLine);
}
System.out.println(response.toString());
httpClient.close();
{"error":{"id":"107c01c3-fbfb-4217-8169-dadb2439b61d","code":"insufficient_scope","message":"access denied. Scopes required to access the resource: [trapi.data.esg.views-basic.read]. Missing scopes: [trapi.data.esg.views-basic.read]","status":"Forbidden"}}
This is my code, but I got above error
Any ideas?
Best Answer
-
Hi @bin0
The above error "insufficient_scope" usually indicates that you do not have a license for the specified endpoint data - in your case ESG. As a test, you can try to retrieve ESG data from the API Playground based on the user ID you were provided in your Welcome email.
I would recommend you contact your Refinitiv account manager to confirm whether a license to retrieve ESG has been set up.
0
Answers
-
Hi
Thanks, I tried same machine ID, password and client ID by useing postman, and python sample, I got same error code, insufficient_scope.
One question for the client ID. I use the apikey portal to generate the appKey. Do you know which account I should log in to generate the App Key, my machine ID account or my developer account. I tried to use my machineID and machine ID password but I cannot log in appkey generation portal, so I use developer account to generate appKey. is that correct.
0 -
hi @bin0
Yes, it's correct. The machine ID account cannot be used to login to generate the appkey, but the developer account can.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 24 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 713 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛