Xiaomi cloud token extractor by Piotr Machowski, fixed so that new xiaomi 2FA method works.
Confirmed working with supplying email as the username. Captcha and 2FA works, just type in the code you receive on your email.
- Python 3.8+
- Dependencies:
requestspycryptodomePillow
python3 -m venv venv
source venv/bin/activate
pip install requests pycryptodome Pillowpython3 token_extractor_2026.pyYou will be prompted for username, password, and server step by step.
python3 token_extractor_2026.py -u YOUR_EMAIL -p YOUR_PASSWORD -s cn| Flag | Description |
|---|---|
-ni, --non_interactive |
Run without interactive prompts |
-u, --username |
Username (email or user ID) |
-p, --password |
Password |
-s, --server |
Server: cn, de, us, ru, tw, sg, in, i2, or leave empty to check all servers |
-l, --log_level |
Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: CRITICAL) |
-o, --output |
Save output to a JSON file |
--host |
Host for serving captcha image |
Check all servers and save results to a file:
python3 token_extractor_2026.py -o output.jsonCheck a specific server with debug logging:
python3 token_extractor_2026.py -s de -l DEBUG| Code | Region |
|---|---|
cn |
China |
de |
Germany |
us |
United States |
ru |
Russia |
tw |
Taiwan |
sg |
Singapore |
in |
India |
i2 |
China (alternate) |