Skip to main content
Complete 2FA login by verifying code

Usage

vastai tfa login [--code CODE] [--method-type METHOD_TYPE] [--secret SECRET] [--backup-code BACKUP_CODE]

Options

--code
string
2FA code from Authenticator app, SMS, or Email
--method-type
string
2FA Method type. Only use when you only have one method of this type Allowed values: email, sms, totp
--secret
string
Secret token from previous login step (required for SMS or Email 2FA)
--backup-code
string
One-time backup code (alternative to regular 2FA code)
--method-id
string
2FA Method ID if you have more than one of the same type (‘id’ from tfa status)

Description

Complete Two-Factor Authentication login by providing the 2FA code. For Email: Include the —method-type email flag and provide -s/—secret from the tfa send-email command response For TOTP: Include the —method-type totp and provide the 6-digit code from your Authenticator app For SMS: Include the —method-type sms flag and provide -s/—secret from the tfa send-sms command response For backup code: Use —backup-code instead of code (codes may only be used once)

Examples

vastai tfa login --method-type totp -c 123456
 vastai tfa login --method-type sms --code 123456 --secret abc123def456
 vastai tfa login -t email -c 123456 -s abc123def456
 vastai tfa login --backup-code ABCD-EFGH-IJKL

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)