Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

What is the root cause of this error code : ERROR!!! Authentication handler failed to request a access token.

“refinitiv.dataplatform.errors.PlatformSessionError: Error code -1 | ERROR!!! Authentication handler failed to request a access token.

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)”

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

Hi @asli.sahin ,


Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
1.3k 3 2 4

@asli.sahin

Another cause of error could be due to a proxy server that blocks request to Internet.

To fix this cause, you need to declare global environment variables HTTP_PROXY and HTTPS_PROXY with the url/ip address of your proxy server:

set HTTP_PROXY=http://proxy_ip:proxy_port
set HTTPS_PROXY=https://proxy_ip:proxy_port

It could be authentified proxy, then you'll need to set with this way:

set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port
set HTTPS_PROXY=https://proxy_userid:proxy_password@proxy_ip:proxy_port
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.

Upvotes
1.3k 3 2 4

Hi @asli.sahin,

We need more information on your environment but it seems you have a self signed certificate or enterprise certificate that blocks requests. If this is confirmed, so the "[SSL: CERTIFICATE_VERIFY_FAILED]" error can't be fixed in the python lib but in your environment.

This is the normal error message when the certificates authorities are not yet correctly setup. It could be a variety of factors to check.

  1. First, you need to verify if your environment needs a cerficate to send requests to Refinitiv platform, then identify this certificate (the file *.perm shoudl be somewhere but you can check
  2. To now where Python gets certificates, run this command line:
> pip install certifi
 ...
> python -c "import certifi; print(certifi.where())"
C:\Users\Uxxxxxxxx\AppData\Local\.certifi\cacert.pem

=> python relies only on this cacert.pem file to manage certificates (all others cannot be found)

3. Your certificate has to be added in this cacert.pem file.
You can check this with your IT how to add it or by yourself manually (copy/paste the text "-----BEGIN CERTIFICATE----- xxxxxxxxxxxxxxxxxx -----END CERTIFICATE-----" from your certificate into cacert.pem)



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.