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
-
The certificate of that server is issued by Sectigo and it is a valid certificate.
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.
1
Answers
-
Thanks for reaching out to us.
If you run the application on the company's machine, the problem could be from Zscaler.
You may need to contact the Zscaler team to whitelist this server. Otherwise, you can try to disable the SSL check for the WebSocket connection.
I found the following solution on StackOverflow.
import ssl
...
wst = threading.Thread(target=self.web_socket_app.run_forever, kwargs={'sslopt': {'check_hostname': False,"cert_reqs": ssl.CERT_NONE}})I am unable to test it because I can run the application properly on my machine.
I hope that this information is of help.
0 -
Hello @changyao.yeo
You may update the Zscaler policy first by opening the Zscaler program --> clicking "More" --> then clicking the "Update policy" button as follows:
If the problem still persists, please contact the Zscaler team as suggested by my colleague.
0 -
Thanks Jirapongse.
Apologies, this is on behalf of client so it's run on an external machine and the problem is likely not from Zscaler.
Besides disabling SSL check for the WebSocket connection, is there anything else client can try.
0 -
@Jirapongse @wasin.w Thank you!0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛