POST /api/me/2fa/disable — disable 2FA. Requires a currently-valid TOTP or recovery code so a session alone cannot strip protection.
POST
/api/me/2fa/disable
const url = 'https://example.com/api/me/2fa/disable';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/me/2fa/disable \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”Media typeapplication/json
{"ok": true} — a bare success acknowledgement.
object
ok
required
Always true on success.
boolean
Examplegenerated
{ "ok": true}