SSL: CERTIFICATE_VERIFY_FAILED for websocket API

Trying to access Real Time Optimized via Websocket API and ran into SSL: CERTIFICATE_VERIFY_FAILED.

Below is the console log / error log for the same.

/usr/local/bin/python3.9 /Users/XXXXX/PycharmProjects/Refiniiv-websocket-api/Applications/Examples/RDP/python/market_price_rdpgw_authentication.py
Sending authentication request with password to https://api.refinitiv.com:443/auth/oauth2/v1/token ...
Refinitiv Data Platform Authentication succeeded. RECEIVED:
{
"access_token":"eyJ0eXAiOi...Om65YA",
"expires_in":"600",
"refresh_token":"ced8c956-7527-46b7-bf35-6e1d4a4f1a16",
"scope":"trapi.streaming.pricing.read",
"token_type":"Bearer"
}
Connecting to WebSocket wss://us-east-1-aws-1-sm.optimized-pricing-api.refinitiv.net:443/WebSocket ...
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)
WebSocket Closed


Also ran the "market_price_rdpgw_service_discovery.py" : getting the same error across all end points

Please let me know on the next steps to resolve this issue.

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @changyao.yeo

    The certificate of that server is issued by Sectigo and it is a valid certificate.

    1678442952243.png

    However, this certificate may be intercepted by the client's proxy or firewall. Therefore, the client should contact the IT or network support team to verify the settings on a client's proxy or firewall server.

Answers