> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-docs-cln-3283-cli-tfa-790d53bc8de7f1f3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai tfa totp-setup

Generate a TOTP secret and QR code for setting up an Authenticator app. Run `vastai tfa auth-new` before this command to authorize adding a new method.

## Usage

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

## Examples

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

This displays a QR code and a manual entry key. Scan the QR code or type the key into your authenticator app (Google Authenticator, Authy, Microsoft Authenticator, 1Password, or any TOTP-compatible app).

After adding the account to your app, complete setup with:

```bash theme={null}
vastai tfa activate --method-type totp --secret <SECRET> <CODE>
```

Where `<SECRET>` is the secret token printed by this command and `<CODE>` is the 6-digit code from your authenticator app.

## 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`) |
