Skip to main content
Generate TOTP secret and QR code for Authenticator app setup

Usage

vastai tfa totp-setup

Description

Set up TOTP (Time-based One-Time Password) 2FA using an Authenticator app. This command generates a new TOTP secret and displays: • A QR code (for scanning with your app) • A manual entry key (for typing into your app) • A secret token (needed for the next step) Workflow:
  1. Run this command to generate the TOTP secret
  2. Add the account to your Authenticator app by either: • Scanning the displayed QR code, OR • Manually entering the key shown
  3. Once added, your app will display a 6-digit code
  4. Complete setup by running: vastai tfa activate —secret <SECRET> <CODE>
Supported Authenticator Apps: • Google Authenticator • Microsoft Authenticator • Authy • 1Password • Any TOTP-compatible app

Examples

vastai tfa totp-setup

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)