This is how it works for PING, for anyone else needing help. wscat could not deal with the multilines I was pasting in.
wscat -c “wss://pubsub-edge.twitch.tv”
{ “type”: “PING”}
< { “type”: “PONG” }
Or for LISTEN to channel-subscribe-events:
{ “type”: “LISTEN”, “nonce”:“23456dghj”, “data”: { “topics”: [“channel-subscribe-events-v1.XXX”], “auth_token”: “XXX” } }
< {“type”:“RESPONSE”,“error”:“”,“nonce”:“23456dghj”}
^ Empty error means no error.