This is the code to check if a simplex link is valid and joinable. Steps to make the script work: 1) Download the simplex-chat cli client. You can follow this guide https://simplex.chat/docs/cli.html#download-chat-client. 2) Create an account for the bot -> simplex-chat-ubuntu-22_04-x86-64 -d $HOME/.simplex/simplep-bot -x Use -x flag to use tor. 3) Create a virtual environment and install websockets module \ python3 -m venv my_venv source my_venv/bin/activate pip install websockets 4) Start a websocket(chat server) -> simplex-chat-ubuntu-22_04-x86-64 -x -p 3030 -d simplep-bot You can use any port number. Make sure to change the port number in the script as well. Here we are using port 3030. 5) Call the is_simplex_link_valid(link) function.