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

Best Answer

Answers

  • 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'}}
  • 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.

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