Whether two-factor authentication is on, until when this console session lasts, recovery codes left.
GET
/api/admin/two-factor
const url = 'https://example.com/api/admin/two-factor';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/admin/two-factorResponses
Section titled “Responses”OK
Media typeapplication/json
object
enabled
required
boolean
openUntil
required
null | string format: date-time
recoveryCodesLeft
required
integer format: int32
Example generated
{ "enabled": true, "openUntil": "2026-04-15T12:00:00Z", "recoveryCodesLeft": 1}