question

Upvotes
Accepted
2 1 1 1

Python SSLError: HTTPSConnectionPool(host='hosted.datascopeapi.reuters.com', port=443)

Hi all,

I am trying to run the python notebooks to retrieve my token using:


r1 = requests.post(requestUrl, json=requestBody,headers=requestHeaders, proxies=proxy, verify=False)


But I got this error:


SSLError: HTTPSConnectionPool(host='hosted.datascopeapi.reuters.com', port=443): Max retries exceeded with url: /RestApi/v1/Authentication/RequestToken (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),))


Furthermore, I got a 403 error (see below) when I tried to open this link in a browser.

https://hosted.datascopeapi.reuters.com/

Any idea of what could be the pb?


Many thx

Server Error

403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.

tick-history-rest-apiauthenticationsslerror-403
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.

Upvotes
Accepted
23k 22 9 14

Hello @kevin.ferret,

When I put into browser https://hosted.datascopeapi.reuters.com/ I get forbidden, 403.

Try http://hosted.datascopeapi.reuters.com and https://hosted.datascope.reuters.com/

If you are unable to access these, suggest to verify RTH connectivity with your organizations network group/admin.

---

My understanding is that you are looking to integrate with RTH REST API, getting started, and your preferred language of integration is Python.

The interaction with Refinitiv Tick History REST, at a high level, is two-step:

1. Use valid credentials to obtain token

2. Use token to submit request.

I would suggest going through our Tutorials and getting this simple interaction running prior to creating your custom python notebook.

I would suggest Programming without SDK Tutorial, focusing on Postman ( tool for tuning "naked" HTTP requests, language-agnostic) and Python sections.

Our Postman section of tutorials comes with companion Postman collection, that you can import and run, to verify the connectivity and validity of your credentials, separately from custom code.

I would suggest REST API Tutorial 1: Connecting to the server.

Further, you can use the collection day-to-day, duplicate any of the requests provided as starter, and tune the request to your requirements, once the request result is as you require, you are ready to put the tuned request inside the custom python code.

Hope this helps, please let us know how this works for you

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 for the reply but I cannot request the token, I am not even looking at downloading data for now. I am blocked with an SSL error in any case (i.e using the provided demo notebooks or mine). Thx

Upvote
38.1k 71 35 53

@kevin.ferret

You may need to check the version of Python, requests library, and OpenSSL.

C:\Users>python
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.1.1g  21 Apr 2020'
>>> quit()

C:\Users>pip list
Package                Version
---------------------- ---------
...
pywin32                228
pywinpty               0.5.7
pyzmq                  19.0.2
refinitiv-dataplatform 1.0.0a6
requests               2.22.0
requests-async         0.6.2
retrying               1.3.3
...
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 vm, seems to work now.

Click below to post an Idea Post Idea