[Repost] Method to Export TOTP Tokens from Authy
Based on Ubuntu 18.04 (regular user), other Linux systems are similar. Golang official website: https://golang.org/ Github repository: https://github.com/alexzorin/authy
Download and Install Golang (Mac System, Using Brew)
brew install go
Download Golang (Ubuntu System)
Since the golang version in the Ubuntu apt repository is 1.10, it cannot run the application used for exporting tokens, so we need to manually download and install the latest version of golang. If you have a lower version of golang already installed, please uninstall it first.
cd ~
wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz
sudo tar -zxvf go1.14.linux-amd64.tar.gz -C /usr/local/bin
You can obtain the latest download link from the golang official website.
Set Environment Variables (Ubuntu System)
export GOPATH=~/go
export GOROOT=/usr/local/bin/go
export GOARCH=amd64
export GOOS=linux
export GOTOOLS=$GOROOT/pkg/tool
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile
Check Version
go version
- If it displays the version you installed, the installation was successful.
Import Repository
#设置代理,请自行修改
export http_proxy=http://192.168.1.180:1081
export https_proxy=http://192.168.1.180:1081
#导入仓库
go get github.com/alexzorin/authy
Due to mainland China network restrictions, you may be unable to download. You can enable http/https proxy, which will not be elaborated here.
Export Token
cd ~/go/src/github.com/alexzorin/authy/cmd/authy-export/
go run authy-export.go
- Follow the prompts to enter your Authy account information: country code (86 for mainland China), phone number, authorization in the Authy APP, and Authy backup password.
- After completing verification, the terminal will display your TOTP token (starting with: otpauth code). After saving, you can add it to other clients.