---
title: "Totp Setup"
method: POST
path: "/api/auth/totp/setup"
tags: ["auth"]
---

# Totp Setup

`POST /api/auth/totp/setup`

## Request

- Base URL: `https://kernelscan.io`
- URL: `https://kernelscan.io/api/auth/totp/setup`
- Auth: none declared

Begin TOTP enrollment. Returns a fresh secret + otpauth URI.

Calling this while a half-finished secret exists (totp_enabled=0,
secret!=NULL) **rotates** to a new secret — simplest UX and the old
secret was never confirmed.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.dev/kernelscan/apis/kernelscan-api.md) · [All operations](https://skmtc.dev/kernelscan/apis/kernelscan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kernelscan/apis/kernelscan-api/revisions/4fa51d41484e?raw)
