A simple and lightweight Time-based One-Time Password (TOTP) generator API built with FastAPI.
docker run -p 7474:80 codedefective/totp
Or with Docker Compose:
docker compose up -d
docker-compose.yml:
services:
totp:
image: codedefective/totp
build: .
ports:
- "7474:80"
POST /Returns the current TOTP code for the given OTP key.
Request:
{
"OtpKey": "JBSWY3DPEHPK3PXP"
}
Response:
{
"val": "524773"
}
cURL example:
curl -X POST "http://localhost:7474/" \
-H "Content-Type: application/json" \
-d '{"OtpKey": "JBSWY3DPEHPK3PXP"}'
Use this API directly from your iPhone or Mac.
OtpKey must be in Base32 format.MIT — see LICENSE on GitHub.
Content type
Image
Digest
sha256:fd1f3a524…
Size
73.7 MB
Last updated
5 months ago
docker pull codedefective/totp