TOTP generator
Use from the command line
Send the secret in the request body for the recommended programmatic interface.
Plain code
printf '%s' "$TOTP_SECRET" |
curl -fsS \
-H 'Content-Type: text/plain' \
--data-binary @- \
https://2fa.prasetya.dev/api/totp
JSON metadata
printf '%s' "$TOTP_SECRET" |
curl -fsS \
-H 'Content-Type: text/plain' \
-H 'Accept: application/json' \
--data-binary @- \
https://2fa.prasetya.dev/api/totp
Compatibility URL, less private
curl -fsS "https://2fa.prasetya.dev/$TOTP_SECRET"
The expanded seed appears in the URL and process arguments. Cloudflare terminates TLS and processes the request. Prefer the body-based endpoint.