Chat bot is having issue connecting to web circuit

Hi Team, need help in knowing as to why chat bot is not able to connect to websocket using the trace below
======================
2023-02-07 16:19:42,358 - INFO - stdout - write - Connecting to WebSocket wss://api.collab.refinitiv.com/services/nt/api/messenger/v1/stream ...
2023-02-07 16:19:42,389 - DEBUG - websocket - debug - Connecting proxy...
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - --- request header ---
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - CONNECT http://api.collab.refinitiv.com:443 HTTP/1.1
Host: http://api.collab.refinitiv.com:443
Proxy-Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
2023-02-07 16:19:42,389 - DEBUG - websocket - dump - -----------------------
2023-02-07 16:19:42,389 - DEBUG - websocket - trace - --- response header ---
2023-02-07 16:19:42,452 - DEBUG - websocket - trace - HTTP/1.0 200 Connection established
2023-02-07 16:19:42,452 - DEBUG - websocket - trace - -----------------------
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - --- request header ---
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: F9NtUb/arQhPOE7/hYhpoA==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
2023-02-07 16:19:42,577 - DEBUG - websocket - dump - -----------------------
2023-02-07 16:19:42,577 - DEBUG - websocket - trace - --- response header ---
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - HTTP/1.1 101 Switching Protocols
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Upgrade: websocket
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Connection: Upgrade
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Sec-WebSocket-Accept: 1DFNbPgIcIdeycRnV72ly4iU008=
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - Sec-WebSocket-Protocol: messenger-json
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - X-Nitro-Hostname: dtcp-clantsv12
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - X-Nitro-Version: 2.23.6
2023-02-07 16:19:42,624 - DEBUG - websocket - trace - -----------------------
Best Answer
-
Hello @arbie.tapel
Thank you for contacting us. Could you please let me know if the chatbot cannot connect to the Chatbot WebSocket server every time or only sometimes?
- Please share the snippet code and full log messages.
- Does the client has any Firewall or proxy policy on their site?
I did a quick test with the Python example and it can connect to the Chatbot WebSocket successfully. The trace messages are as follows:
Connecting to WebSocket wss://api.collab.refinitiv.com/services/nt/api/messenger/v1/stream ...
--- request header ---
2023-02-08 11:45:14: DEBUG:websocket :--- request header ---
GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: RvXt22cFF6FtAKHozlKd8g==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
2023-02-08 11:45:14: DEBUG:websocket :GET /services/nt/api/messenger/v1/stream HTTP/1.1
Upgrade: websocket
Host: api.collab.refinitiv.com
Origin: https://api.collab.refinitiv.com
Sec-WebSocket-Key: RvXt22cFF6FtAKHozlKd8g==
Sec-WebSocket-Version: 13
Connection: Upgrade
Sec-WebSocket-Protocol: messenger-json
-----------------------
2023-02-08 11:45:14: DEBUG:websocket :-----------------------
--- response header ---
2023-02-08 11:45:14: DEBUG:websocket :--- response header ---
HTTP/1.1 101 Switching Protocols
2023-02-08 11:45:14: DEBUG:websocket :HTTP/1.1 101 Switching Protocols
Upgrade: websocket
2023-02-08 11:45:14: DEBUG:websocket :Upgrade: websocket
Connection: Upgrade
2023-02-08 11:45:14: DEBUG:websocket :Connection: Upgrade
Sec-WebSocket-Accept: IFhQ9c43ld0S0Pdo00Fy1BvbE5U=
2023-02-08 11:45:14: DEBUG:websocket :Sec-WebSocket-Accept: IFhQ9c43ld0S0Pdo00Fy1BvbE5U=
Sec-WebSocket-Protocol: messenger-json
2023-02-08 11:45:14: DEBUG:websocket :Sec-WebSocket-Protocol: messenger-json
X-Nitro-Hostname: dtcp-clantsv10
2023-02-08 11:45:14: DEBUG:websocket :X-Nitro-Hostname: dtcp-clantsv10
X-Nitro-Version: 2.23.6
2023-02-08 11:45:14: DEBUG:websocket :X-Nitro-Version: 2.23.6
-----------------------
2023-02-08 11:45:14: DEBUG:websocket :-----------------------
2023-02-08 11:45:14: INFO:root :Receive: onopen event. WebSocket Connection is establishedExample code:
web_socket_app = websocket.WebSocketApp(
ws_url,
on_message=on_message,
on_error=on_error,
on_close=on_close,
on_open=on_open,
subprotocols=['messenger-json'])
...
def on_open(_): # Called when handshake is complete and websocket is open, send login
# send RDP Login authen0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛