question

Upvotes
Accepted
5 0 1 0

RDP requests don't return anything

Hi, I have a problem with the RDP API accessed via Python. I have installed the package https://pypi.org/project/refinitiv-dataplatform/ and have followed the instructions from this notebook https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.Python/blob/master/1.4.0%20-%20Function%20-%20News.ipynb. I think I was able to generate the token successfully, but the request to get the news headlines didn't return anything. There was no error message either, so it's difficult to debug. I have attached the screenshot so that you could have the full picture.

pythonrdp-apirefinitiv-data-platform
rdp-issue.png (20.4 KiB)
icon clock
10 |1500

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

Upvote
Accepted
20.3k 73 10 20

Hi @Natalia.Skaczkowska

Please enable the logging and attach the output (you can remove any credential related output)

mySession = rdp.get_default_session()
mySession.set_log_level(1)

Also, you can try the alternative 'Content Story and Headlines' examples under https://github.com/jasonramchandani/DeveloperDayResources/tree/master/RefinitivDataPlatformSampleCode

These examples output state information at the Session level and may therefore provide additional diagnostics.

icon clock
10 |1500

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

Thanks, that's a very useful tip! After I run rdp.get_news_headlines('Apple'), the log says:

2020-02-04 11:31:00,370 P[11424] [MainThread 7256] HTTP request response 403: {"error":{"id":"08011b65-0ed4-48f6-8e50-f155bf2a1399","code":"insufficient_scope","message":"access denied. Scopes required to access the resource [trapi.data.news.read]","status":"Forbidden"}} 
2020-02-04 11:31:00,371 P[11424] [MainThread 7256] News Headlines request failed: {'http_status_code': 403, 'http_reason': 'Forbidden', 'error': {'id': '08011b65-0ed4-48f6-8e50-f155bf2a1399', 'code': 'insufficient_scope', 'message': 'access denied. Scopes required to access the resource [trapi.data.news.read]', 'status': 'Forbidden'}}
Upvotes
20.3k 73 10 20

As per the message your account/login is not permissioned to access that particular data type.

For external users, I would recommend they speak to their Refinitiv account representative to discuss getting access to the required data.

icon clock
10 |1500

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

Thank you for your prompt help. I am an internal user, so I'll go with the Service Now ticket.

Click below to post an Idea Post Idea