---
title: "Enable two-factor authentication in a two steps"
method: PATCH
path: "/company/v1/users/me/twofa_enable"
tags: ["usersService"]
---

# Enable two-factor authentication in a two steps

`PATCH /company/v1/users/me/twofa_enable`

Enable two-factor authentication in a two steps

## Request body

- TwoFactorEnable
  - `step` 'get-qr-code' | 'verify-secret', required
  - `code` string — Available on a second step (check-code)

## Response `200`

OK

- TwoFactorGetQr
  - `secretKey` string
  - `qrCodeUri` string

## Other responses

- `401` — Access token is missing or invalid
- `403` — The code has expired
- `422` — Validation error response

---

[API](https://skmtc.net/uspacy/apis/uspacy-api.md) · [All operations](https://skmtc.net/uspacy/apis/uspacy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uspacy/uspacy-api/versions/c3f48fd1c26b/schema)
