Ruri
January 31, 2022, 5:41pm
2
403 means forbidden so maybe it’s blocking your IP or something. I just tried again and my websocket guide works perfectly for me, so it must be a problem on your end.
This is a really simple example on how to use websockets in OB2.
BLOCK:WsConnect
url = "wss://demo.piesocket.com/v3/channel_1?api_key=oCdCMcMPQpbvNjUIzqtvF1d2X2okWpDQj4AwARJuAgtjhzKxVEjQU6IdCjwm¬ify_self"
ENDBLOCK
BLOCK:WsSend
message = "hello"
ENDBLOCK
BLOCK:Delay
milliseconds = 1000
ENDBLOCK
BLOCK:WsRead
=> VAR @wsReadOutput
ENDBLOCK
BLOCK:WsDisconnect
ENDBLOCK
Note that this is just for testing. In most real-world scenarios you will need to first send an HTTP request to the H…