How to get a token robot vacuum cleaner Xiaomi Vacuum Mop: official and alternative methods

The Xiaomi Vacuum Mop robot vacuum token is a unique digital key that allows access to advanced device management through third-party applications, scripts or smart home systems. Without it, it is impossible to integrate the vacuum cleaner with Home Assistant, Node-RED or other platforms, or use informal firmware or automation. The problem is that Xiaomi does not provide the token openly: it needs to be extracted independently, and here users face a lot of pitfalls โ€“ from changing authentication protocols to blocking accounts for โ€œsuspicious activity.โ€

In this article, we will discuss 5 working ways to obtain a token for all Xiaomi Vacuum Mop models (including S5/S6/S7, P10, X10+ and others) relevant for 2026. We will pay special attention to bypassing the new Xiaomi restrictions that were introduced after the MiIo 2.0 protocol update in 2023. You will learn how to avoid Invalid token or Device not found errors, and what to do if the token suddenly stopped working after updating the vacuum cleaner firmware.

1.Official method: extraction of the token through Mi Home (Android)

The most reliable method is to get the token directly from the official Mi Home app, but it requires an Android device with root rights or the use of specialized tools. Xiaomi actively blocks such actions, so we apply a workaround.

You'll need:

  • ๐Ÿ“ฑ Smartphone on Android 8.0+ (without MIUI โ€” Better pure Android or LineageOS)
  • ๐Ÿ”ง Kiwi Browser app (with extension support)
  • ๐Ÿ›  MiTokenExtractor extension (installed in Kiwi Browser)
  • ๐Ÿ“‹ Login and password from the account Mi Account, which is tied to the vacuum cleaner

Step-by-step:

  1. Install Kiwi Browser and add the MiTokenExtractor extension to it via the extension menu (chrome://extensions).
  2. Sign in to Mi Home on this device and make sure the vacuum cleaner is displayed in the list of devices.
  3. Open the Kiwi Browser page https://account.xiaomi.com/ and log in to your account.
  4. In the MiTokenExtractor extension panel, click Start Sniffing and return to Mi Home.
  5. Open the vacuum cleaner card and perform any action (e.g., start cleaning) the token will appear in the expansion logs.

โš ๏ธ Attention: If you are using MIUI, It can block traffic interception, so try the airplane mode with Wi-Fi on, or use the second method.

Install Kiwi Browser|Add the extension MiTokenExtractor|Authorize in Mi Home|Run sniffing in extension|Play the action with a vacuum cleaner-->

2. Alternative method: through Python script (without root)

If you don't have root rights, but you have access to a computer, you can use a Python script that emulates authorization to Mi Account and extracts a token, which works even on iOS, but requires minimal terminal skills.

Instructions:

  1. Install Python 3.8+ and the Miio: Pip install python-miio library
  2. Download the script get_miio_token.py (Updated for MiIo 2.0).
  3. Open the script and enter the username / password from Mi Account: python get_miio_token.py
  4. The script will display a list of devices with their tokens. Find a row with a model of the vacuum cleaner (for example, roborock.vacuum.a10).

Advantages of the method:

  • ๐Ÿ”น It works without root and on any device.
  • ๐Ÿ”น Supports new Xiaomi protocols
  • ๐Ÿ”น It can be automated (for example, to obtain tokens of several devices)

โš ๏ธ Note: Xiaomi can block an account for โ€œsuspicious activityโ€ if you use this method frequently, we recommend that you enable two-factor authentication and use the method no more than 1 time per month.

๐Ÿ’ก

If the script gives an error, try changing the region of your Mi Home account to Singapore or Germany, which bypasses some restrictions.

3. Token extraction via Home Assistant (for experienced)

If you already use Home Assistant, the token can be obtained directly through Xiaomi Miio integration, which is suitable for users who already have a vacuum cleaner connected to the system, but the token is unknown.

Algorithm of action:

  1. Open the configuration file configuration.yaml and add: vacuum: - platform: xiaomi_miio host: 192.168.1.100 # IP your token vacuum cleaner: YOUR_TOKEN # leave empty
  2. Reboot Home Assistant.
  3. In the logs (Developer Tools โ†’ Logs) find the error string containing the token (example: Failed to connect to vacuum with token: 1234567890abcdef1234567890abcdef).

This method works because Home Assistant, when a connection error is made, displays the token in the log. After receiving the data, remember to delete the token string from the configuration to avoid leaks.

Why Home Assistant shows the token in the logs?
This is a feature of the python-miio library, which, when authentication is mistaken, displays the transferred token into debugging information. Home Assistant developers deliberately do not hide this point, since it is assumed that the user already has the token, but this can be used to extract it if the vacuum cleaner was previously associated with the account.

4. Obtaining a token through Mi Home (iOS) using MITM-proxy

For iPhone or iPad owners, the process is complicated by the closedness of iOS, but you can get around the restrictions by intercepting traffic through a proxy server.

Instructions:

  • ๐Ÿ–ฅ Install Charles Proxy on PC and set it up to intercept HTTPS-traffic (include) SSL Proxying for domain api.io.mi.com).
  • ๐Ÿ“ฑ On iPhone, connect to the same network as your PC and set up a proxy in Settings โ†’ Wi-Fi โ†’ (your network) โ†’ Set up a proxy โ†’ Manually (specify) IP PC and port 8888).
  • ๐Ÿ” Install Charles Certificate on iPhone (instructions on the developerโ€™s website).
  • ๐Ÿ“ฑ Open Mi Home, log in and perform any action with a vacuum cleaner.
  • ๐Ÿ–ฅ In Charles Proxy, find a request for /home/device_list โ€” will be the token.

The complexity of the method:

  • โš ๏ธ Requires proxies and certificates skills
  • โš ๏ธ Xiaomi may block an account if intercepted
  • โš ๏ธ On iOS 15+ You need to disable the certificate check in the application settings (if available)

Through Mi Home (Android)|Python-script|Home Assistant|MITM-proxy (iOS)|Another way.-->

5. Buying a token: risks and alternatives

On the Internet, you can find offers for the sale of tokens for Xiaomi Vacuum Mop - from 50 to 500 rubles.

RiskEffects of consequencesHow to avoid
Account data breachThe seller can access your Mi Account and other devicesUse a temporary account only for the vacuum cleaner
An invalid tokenThe token may be withdrawn or owned by another deviceCheck the token through miio inspect before payment
Locking the deviceXiaomi may block vacuum cleaner for โ€œillegalโ€ useDo not use tokens from dubious sources

An alternative to buying is to exchange tokens in communities (for example, on the 4PDA forum or in Telegram chats on Home Assistant), where tokens are often shared for free, but check their relevance!

6. Frequent errors and their solutions

When dealing with tokens, users face typical problems.

Mistake: Invalid token

  • ๐Ÿ”ธ Token is outdated (valid for 1 year or until the password change in Mi Account)
  • ๐Ÿ”ธ The device is tied to another region (check in Mi Home)
  • ๐Ÿ”ธ Vacuum cleaner updated the firmware and changed the protocol (need token for MiIo 2.0)

Error: Device not found

  • ๐Ÿ”ธ Wrong. IP-vacuum cleaner address (check in router or via nmap)
  • ๐Ÿ”ธ Vacuum cleaner in sleep mode (wake it with a button on the case)
  • ๐Ÿ”ธ Local Access Lock in Mi Home Settings (Disable Local Network Permission)

Error: Unauthorized when authorizing

  • ๐Ÿ”ธ Two-factor authentication enabled (should be temporarily disabled)
  • ๐Ÿ”ธ Account blocked for โ€œsuspicious activityโ€ (email in support of Xiaomi)
  • ๐Ÿ”ธ Used. VPN or proxy (turn off and try again)

๐Ÿ’ก

If the vacuum cleaner has stopped responding to commands with the token, check it first. IP-Xiaomi frequently changes local addresses IP post-firmware update.

Can I get a token without a Mi Account?
No, the token is tied to the Mi Account, and you can't extract the key without it, but you can create a second account specifically for the vacuum cleaner and tie the device to it.
How to check if the token works?
Use the command in the terminal: miio inspect --ip 192.168.1.100 --token YOUR_TOKEN If the answer contains information about the vacuum cleaner (model, charge, status) โ€“ the token is valid.
How long does the token last?
Officially, the token is valid for 1 year, but can be withdrawn earlier in case of: Change of password in Mi Account Vacuum Firmware Update (sometimes) Manual Review via Mi Home (in device settings)
Can I use one token for several vacuum cleaners?
No, each token is unique to one device, but one Mi Account can manage multiple vacuum cleaners, and each will have its own token.
What if Xiaomi has blocked the account after the token is extracted?
Follow the steps: Write in support of Xiaomi asking you to unlock your account (specify that you have โ€œtried to set up a smart homeโ€). If the lock is temporary (24-48 hours), wait for unlocking. In the future, use a separate account for experiments with tokens.