---
title: "Disable second factor authentication"
method: PUT
path: "/users/{username}/2fa/disable"
tags: ["users"]
---

# Disable second factor authentication

`PUT /users/{username}/2fa/disable`

Disables second factor authentication for the given user. This API must be used if the user loses access to their second factor auth device and has no recovery codes

## Response `200`

successful operation

- ApiResponse
  - `message` string — message, can be empty
  - `error` string — error description if any

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `default` — Unexpected Error

---

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