invalid token error when using content summaries, but not get_history, using lseg.data API

I'm not sure what I may be doing wrong here. When I use the LSEG Data Library to download historical interday data, if I do the request like this, it gives back data just fine:
In [165]: ld.get_history('MSFT.O', 'TR.Volume', interval='1D', start='2025-01-01', end='2025-06-06')
Out[165]:
MSFT.O Volume
Date
2025-01-02 16896469
2025-01-03 16662943
2025-01-06 20573648
2025-01-07 18139065
2025-01-08 15054575
However, if I instead spell the query using the content API, using:
definition = ld.content.historical_pricing.summaries.Definition('MSFT.O', fields=['TR.Volume'], start='2025-01-01', end='2025-06-06', interval='P1D')
definition.get_data()
I get a 403 forbidden error saying I have an invalid token:
```
LDError: No data to return, please check errors: ERROR: No successful response.
(403, <html>
<head>
<title>Forbidden</title>
<style type="text/css">
body {
background-color: #242424;
color: #c8c7c7;
font-family: Calibri, Helvetica, Arial, sans-serif;
font-size: 16px;
}
</style>
</head>
<!-- Response
Server: PLNP-ERPA01
Date: Tue, 10 Jun 2025 22:36:05 GMT
HTTP Code: 403
HTTP Response: Forbidden
X-Varnish: 71236781
Backend: default
-->
<body>
<h1>Forbidden</h1>
<p>Invalid token</p>
</body>
</html>)
```
How can I fix this/what am I doing wrong?
Answers
-
Hello @davidk
Based on my knowledge, the ld.get_history (Access Layer) and ld.content.historical_pricing.summaries (Content Layer) interfaces request historical data from different endpoint.
To let us check this behavior in detail, could you please give us more detail as follows?
- Are you using the Desktop Session or Platform Session?
- If you can replicate the issue on demand, please enable the debug log and share the log on this post.
You can enable the debug log via lseg-data.config.json file as follows:
{
"logs": {
"level": "debug",
"transports": {
"console": {
"enabled": false
},
"file": {
"enabled": true,
"name": "lseg-data-lib.log"
}
}
},
"sessions": {
"default": "xxxx",
}
}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
- 686 Datastream
- 1.4K DSS
- 620 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
- 254 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
- 276 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
- 662 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 中文论坛