start_2fa
Start a two-factor authentication challenge for sensitive actions, sending a verification code via a chosen channel and returning a session ID to poll until verified.
Instructions
Start a two-factor authentication challenge for a sensitive operation. Sends a verification code via the chosen channel. Returns a session ID, and for messaging channels: deep_link, qr_code (base64 PNG), and qr_text (UTF-8 text QR for terminal display).
Agent usage — full 2FA flow: (1) Call start_2fa with the appropriate action_type and channel. (2) Present the challenge, and do NOT announce a message the server did not send: email is the ONLY channel it dispatches on. On telegram/whatsapp the user opens deep_link and sends the message themselves; on sms they send sms_message to a number from sms_dids; the response's own instructions field says which. On email, a 200 carrying requires_email_selection: true and available_emails means nothing was sent and no session exists — ask which address and call again with email_id. For telegram/whatsapp, pass deep_link to render_auth_link; for sms, show sms_message. Never hand qr_text to a link renderer — it is the link already rendered as QR art, so print it verbatim inside a fenced code block only when a real terminal needs the QR. (3) Poll get_2fa_status with the returned session_id until status is "verified" (the user enters the code on their device) or "expired". (4) If verified, proceed with the protected operation (e.g. create_api_key). If expired, inform the user and offer to restart. Typical channels: "telegram" or "email". For email, the user may receive a magic link instead of a code — the backend handles this automatically.
The user does not see tool results — most clients fold them away, render_auth_link's output included. Before you wait or poll, put what the user must act on into your own reply text: the link itself (not a sentence announcing it), the SMS text and number, or a note to check their inbox.
ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, or sign in with start_login — a session opens this tool — then call this tool again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | Channel to receive the verification code | |
| targets | No | The ids the step-up is FOR — the grant is bound to exactly these and refused for any other request (`reason: target_mismatch`). revocation_bulk: the asset id you will pass to revoke_asset (one code per asset); phone_remove / email_remove: the phone or email record id; domain_remove: the domain id; profile_delete: the project id; account_delete: your own user id (get_current_user). Leave out for the other action types. | |
| email_id | No | Specific email ID for email channel (optional) | |
| action_type | Yes | The sensitive action requiring 2FA |