In addition to this, I’ve been successful in retrieving the tokens using this method:
What you first do is, reset the device to manufacturing settings. This will normally let you re-pair the device to your home WiFi via your mobile phone app (how-to in this video: https://youtu.be/NZl1P7rR8WQ?t=64), but that’s NOT what we want for now… We want to get that token.
So, on your computer you should connect to the WiFI of the device instead and find its ip address, via cmd.exe with ipconfig (normally would be 192.168.4.1).
Then just use the steps in https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token.md#method-2---packet-sender-tool and you should be able to retreive the hex token.