> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai tfa totp-setup

Generate TOTP secret and QR code for Authenticator app setup

## Usage

```bash theme={null}
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 --method-type totp --secret \<SECRET> \<CODE>

Supported Authenticator Apps:
• Google Authenticator
• Microsoft Authenticator
• Authy
• 1Password
• Any TOTP-compatible app

## Examples

```bash theme={null}
vastai tfa totp-setup
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
