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.
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.