> ## 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 send-sms

Request a 2FA verification code via SMS. Returns a secret token needed for the next step (`vastai tfa activate` or `vastai tfa login`).

## Usage

```bash theme={null}
vastai tfa send-sms [--phone-number PHONE_NUMBER]
```

## Options

<ParamField path="--phone-number" type="string">
  Phone number to receive the SMS code in E.164 format (e.g., `+12345678901`). If omitted, uses the phone number on your account.
</ParamField>

## Examples

```bash theme={null}
# Send to the phone number on your account
vastai tfa send-sms

# Send to a specific phone number
vastai tfa send-sms --phone-number +12345678901
```

The command prints a secret token. Use it with the code you receive:

```bash theme={null}
# If setting up SMS 2FA for the first time
vastai tfa activate --method-type sms --secret <SECRET> --phone-number +12345678901 <CODE>

# If completing a 2FA login
vastai tfa login --method-type sms --secret <SECRET> --code <CODE>
```

If the code expires before you use it, run `vastai tfa resend-sms --secret <SECRET>` to get a new one.

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