It's just and example how to handle Mattermost WebSocket events and relay them to your backend.
python 3.5+
git clone https://github.com/AlexandrVLopatin/mmrelay.git
cd mmrelay
pip install -r requirements.txtThere are several options defined by consts in mmreplay.py:
MM_URL: Mattermost API endpointMM_WSURL: Mattermost WebSocket endpointMM_LOGIN: Mattermost admin usernameMM_PASSWORD: Mattermost admin passwordCALLBACK_URL: Your API endpointCALLBACK_TIMEOUT: Your API request timeout