question

Upvotes
Accepted
1 0 0 0

How can we print out NEWS Headlines in Workspace?

Seeking assistance/guidance regarding the client's query about obtaining data from the NEWS app using API.


Client is trying to retrieve the top 20 news headlines from google. Below are his steps:

- open the session on line 9

- On line 11 client call the api to retrieve the 20 news articles applying to google.

- Line 13 - 24 is code client defined to print the headlines or show the error received.

- Finally close the session.
Attaching screenshot of client's sample.newsapisample.png


The terminal shows the following output:

ScopeError: Error code -1 | Insufficient scope for key=/data/news/v1/headlines, method=GET.

Required scopes: {'trapi.data.news.read'}

Available scopes: {'trapi.auth.cloud-credentials', 'trapi.user-framework.application-metadata.raplib', 'trapi.searchcore.metadata.read', 'trapi.search.metadata.read', 'trapi.streaming.synthetic.read', 'trapi.data.historical-pricing.events.read', 'trapi.data.get.data.read', 'trapi.search.lookup.read', 'trapi.user-framework.mobile.crud', 'trapi.data.quantitative-analytics.read', 'trapi.data.average-volume-analytics.ava_read', 'trapi.alerts.history.crud', 'trapi.user-framework.recently-used.crud', 'trapi.synthetic.crud', 'trapi.platform.iam.guiss', 'trapi.data.benchmark.bmk_read', 'trapi.streaming.prcperf.read', 'trapi.search.explore.read', 'trapi.search.read', 'trapi.data.historical-pricing.summaries.read', 'trapi.sdbold', 'trapi.searchcore.lookup.read', 'trapi.streaming.pricing.read', 'trapi.graphql.subscriber.access', 'trapi.searchcore.read', 'trapi.alerts.publication.crud', 'trapi.alerts.preferences.crud', 'trapi.frtb.sentimarization', 'trapi.alerts.subscription.crud', 'trapi.platform.iam.acl_service', 'trapi.user-framework.workspace.crud'}

Missing scopes: {'trapi.data.news.read'}


Client's goal is to retrieve the news headlines and tweets from:

Alphabet, Amazon, Apple, Berkshire Hathaway, Broadcom, Eli Lilly, Meta, Microsoft, Nvidia, and Tesla


Any assistance regarding this is appreciated.

pythonworkspace#technologyrdp-apinewsrefinitiv-data-libraries
newsapisample.png (190.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
26.4k 62 17 14

Hello @jeffearvin.mallari01

The error messages "ScopeError: Error code -1 | Insufficient scope for key=/data/news/v1/headlines, method=GET. Required scopes: {'trapi.data.news.read'}" and "Missing scopes: {'trapi.data.news.read'}" indicates that the client account does not have permission to request News data from the RDP News service.

I strongly suggest you contact the client's LSEG representative to verify the client's account permission set (especially the News service).

I hope this information helps.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.