> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vast.ai/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`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.