Activate a new 2FA method by verifying the code.
Signature
VastAI.tfa_activate(
method_type: Optional[str] = 'totp',
secret: Optional[str] = None,
phone_number: Optional[str] = None,
label: Optional[str] = None
) -> dict
Parameters
method_type
Optional[str]
default:"totp"
New 2FA Method type to activate
Secret token from setup process (required)
Phone number for SMS method (E.164 format)
Label for the new 2FA method
Returns
dict
Example
from vastai import VastAI
client = VastAI(api_key="YOUR_API_KEY")
result = client.tfa_activate()
print(result)