How can I connect to a secure web socket from a specific website [closed]

I want to automate actions on momio.me programmatically using python.

To do so I need to connect to wss://de.momio.me/pipe and then send the messages accordingly

I have tried connecting to the websocket directly but as soon as I sent a message it immediately closed the connection.

I could use selenium as an alternative to achieve the automation but I would not be able to learn much this way.