Whether two-factor is enabled for the signed-in user.
GET
/api/auth/two-factor
const url = 'https://api.tradr.cloud/api/auth/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://api.tradr.cloud/api/auth/two-factorReturns { enabled } — true once an enrolment has been confirmed, false otherwise (including a started-but-unconfirmed enrolment). Requires an authenticated session. Read-only and side-effect-free.
Responses
Section titled “ Responses ”The two-factor status.
Media typeapplication/json
object
enabled
boolean
Examplegenerated
{ "enabled": true}No authenticated session.