---
title: "Two-Factor Authentication"
method: PUT
path: "/api/3/users/{id}/2FA"
tags: ["User"]
---

# Two-Factor Authentication

`PUT /api/3/users/{id}/2FA`

Sets the authentication token seed (key) for the user. This key may be then be used in the appropriate 2FA authenticator.

## Path parameters

- `id` integer, required — The identifier of the user.

## Request body

- string — The authentication token seed (key) to use for the user.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

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