Skip to main content
Generate TOTP codes from authenticator apps (Google Authenticator, Microsoft Authenticator, Authy) for 2FA.
If you are looking for 2FA codes from Email or Slack, please refer to the Two-Factor Authentication Integration documentation.

Get Your TOTP Secret

Follow this guide to extract your TOTP secret: TOTP Secret Extraction Guide

Direct TOTP Secret

Provide the TOTP secret directly in secure_parameters:
{
  "secure_parameters": {
    "auth_code": [{
      "totp": {
        "totp_secret": "YOUR_BASE32_SECRET",
        "digits": 6
      }
    }]
  }
}
PropertyTypeDefaultDescription
totp_secretstrRequiredBase32-encoded TOTP secret
digitsint6Number of digits in code

Store the TOTP secret in 1Password for better security:
{
  "secure_parameters": {
    "auth_code": [{
      "onepassword": {
        "type": "totp_secret",
        "vault_name": "my_vault",
        "item_name": "my_login",
        "field_name": "totp_secret",
        "digits": 6
      }
    }]
  }
}
See 1Password Integration for setup instructions.

Using in Automations

Reference the TOTP code like any parameter:
{
  "type": "action_node",
  "interaction_action": {
    "input_text": {
      "command": "get_by_label(\"Verification Code\")",
      "input_text": "{auth_code[0]}",
      "prompt_instructions": "Enter the 2FA code"
    }
  }
}