Code2FA
VI
EnglishTiếng Việt中文РусскийEspañol

API lấy mã 2FA miễn phí

Nhận mã hiện tại của một secret key dạng JSON. Miễn phí, không cần đăng ký, đã bật CORS.

GET https://api.code2fa.co/tok/JBSWY3DPEHPK3PXP
→ {"token":"123456"}

GET https://api.code2fa.co/totp/JBSWY3DPEHPK3PXP?digits=6&period=30&algorithm=SHA1
→ {"token":"123456","next":"654321","remaining":17,"period":30,"digits":6}

POST https://api.code2fa.co/bulk          (body: one key or ID|Pass|KEY per line, max 500)
→ {"remaining":17,"results":[{"token":"123456"},{"error":"invalid secret key"}]}

GET https://api.code2fa.co/time
→ {"now":1795255000000,"timezone":"Asia/Ho_Chi_Minh","country":"VN"}
curl https://api.code2fa.co/tok/JBSWY3DPEHPK3PXP

# Python
import requests
print(requests.get("https://api.code2fa.co/tok/JBSWY3DPEHPK3PXP").json()["token"])

Lưu ý

Mở công cụ lấy mã 2FA