Skip to content
You're viewing documentation for v2026.11.13-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Start TOTP enrolment

Returns a new secret. It is not active until the user confirms it with a code. A new start replaces a pending secret.

POST/api/v1/auth/two-factor/enrolment
Authorization
tse_sessionAPI key · cookierequired
Responses
200

OK

otpauth_uristringrequired
qr_codestringrequired

The QR code of otpauth_uri, as a PNG data URI

secretstringrequired

The base32 secret, for manual entry in the authenticator app

default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X POST 'https://console.example.com/api/v1/auth/two-factor/enrolment' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "otpauth_uri": "string",
  "qr_code": "string",
  "secret": "string"
}