Skip to content
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Get your two-factor state

Get the two-factor state of the current local user.

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

OK

enabledbooleanrequired

The user has confirmed TOTP

recovery_codes_remaininginteger<int64>required
requiredbooleanrequired

An admin requires two-factor for local users

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 GET 'https://console.example.com/api/v1/auth/two-factor' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "enabled": true,
  "recovery_codes_remaining": 0,
  "required": true
}