I am using the LSEG Data SDK in Python and can query other endpoints successfully, but the news headlines endpoint fails with a scope error.
Minimal example:
import lseg.data as ld
ld.open_session() # using configured credentials
df = ld.news.get_headlines(
query=["LSEG.L"],
count=10
)
print(df.head())
ld.close_session()
Error (trimmed):
ScopeError: Insufficient scope for key=/data/news/v1/headlines, method=GET.
Required scopes: {'trapi.data.news.read'}
Missing scopes: {'trapi.data.news.read'}
I can access non-news data endpoints in the same environment/session, so connectivity and authentication are generally working.
What I want to understand:
- Is there any SDK/session configuration needed to request this scope explicitly, or is this only managed via account entitlements?
- If the latter, what is the process to gain access to the
trapi.data.news.readscope? - Is there a way to pre-check available scopes in code before calling
news.get_headlines() so I can handle this gracefully?
I’m avoiding sharing any account details, keys, or internal code wrappers, but can provide SDK version and environment details if needed.