---
title: "Generate backup codes"
method: POST
path: "/totp/generate-backup-codes"
tags: ["TOTP Plugin"]
---

# Generate backup codes

`POST /totp/generate-backup-codes`

Generates a new set of backup codes for the authenticated user. Previous backup codes are invalidated.

## Response `200`

OK

- GenerateBackupCodesResponse
  - `backup_codes` string[], required

---

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