Press / to search

All documentation
docs Teach the agent Step reference

Runs onWrit CloudDesktopSelf-hosted

Authentication step

Two-factor (2FA)

The twofa step completes a two-factor challenge on your own authorized account. The code is obtained server-side from the configured persona — a generated TOTP, a code read from the persona's connected mailbox, or one received by SMS — and entered on the page.

In a workflow, this is a step object with "type": "twofa". Steps run in order, and each step can read the outputs of the steps before it. See the full workflows reference for the 30+ step types.

Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

Fields

FieldTypeDescription
selector selector The code input; auto-detected when omitted.
submit_selector selector Optional Verify/Continue button to click after the code is entered.

Example

A single twofa step as it appears in a workflow's steps array:

{
  "type": "twofa",
  "config": { "selector": "input[name='code']" }
}

How it behaves

  • The code is generated or read server-side from the persona; it is never exposed to AI steps or stored in the recipe.
  • Authenticator (TOTP), email, and SMS challenges are all handled the same way.
  • Strictly for your own authorized accounts.

Where it runs

The twofa step executes wherever the run executes. On your local or BYO agent there is no compute charge and the agent can reach intranet-only systems; on Writ cloud the run is metered by running time (~$0.12 per browser-hour, from your plan’s included usage wallet.

What next

  • Workflows - the full step vocabulary and the workflow object.
  • Recorder - capture steps by clicking through a site.
  • Managed endpoints - turn the workflow into a REST endpoint, or an MCP tool.