---
title: "Select a two-factor method"
method: POST
path: "/tf-select"
---

# Select a two-factor method

`POST /tf-select`

## Request body

- object
  - `which` string — Which two-factor method to use.

## Response `200`

Second factor select response.

- union
  - object — The user requires two-factor authorization and has chosen which one to use.
    - `meta` object, required
      - `code` integer, required — Http status code
    - `response` object, required
      - `tf_required` boolean — Will be True since a second factor is required.
      - `tf_state` string — if "setup_from_login" then the caller must go through two-factor setup endpoint. If "ready" then a code has been sent and should be supplied to SECURITY_TWO_FACTOR_TOKEN_VALIDATION_URL.
      - `tf_method` string — Which method was used to send code/link.
  - object — The user requires two-factor authorization and has chosen to use `webauthn`.
    - `meta` object, required
      - `code` integer, required — Http status code
    - `response` object, required
      - `tf_required` boolean — Will be True since a second factor is required.
      - `tf_state` string — This will be set to `ready`.
      - `tf_method` string — This will be set to `webauthn`.
      - `tf_signin_url` string — The value of SECURITY_WAN_SIGNIN_URL

## Other responses

- `302` — User selected which two-factor to use when using form based request.
- `400` — Errors while validating attributes.

---

[API](https://skmtc.net/pallets-eco/apis/flask-security-external-api.md) · [All operations](https://skmtc.net/pallets-eco/apis/flask-security-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pallets-eco/flask-security-external-api/versions/5ee7c28d6e1e/schema)
