---
title: "Enable 2FA for the authenticated user"
method: POST
path: "/user/two-factor-authentication"
tags: ["Users"]
---

# Enable 2FA for the authenticated user

`POST /user/two-factor-authentication`

Starts the two-factor-authentication enrolment flow for the
currently authenticated user. The shared secret and QR code can
be fetched via `getCurrentUserTwoFactorQrCode` /
`getCurrentUserTwoFactorSecretKey`. The user must then confirm
enrolment via `actionConfirmCurrentUserTwoFactorAuthentication`
before 2FA is fully active.

## Request body

- object — An empty request body; reserved for future fields.

## Response `200`

2FA enrolment was successfully started.

- object, nullable — An empty JSON response.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
