This tool/script retrieves tokens for all devices connected to Xiaomi cloud.
Download and run token_extractor.exe.
Install dependencies:
pip3 install pycryptodome pybase64 requests
Download and run script:
wget https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/token_extractor.py
python3 token_extractor.py