PRASETYA.DEV / TOTP

Low-network mode

Generate aTOTP code

Your secret is used in this tab and is not saved by this app.

This secret came from the URL. The address bar is now cleared, but the URL request was already sent to the service. Paste at / next time.

TOTP generator

Secret input

Spaces between groups are allowed.

Current code

Paste a valid Base32 secret to generate a code.
Advanced settings

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.