Turn two-factor off.
POST
/api/auth/two-factor/disable
const url = 'https://api.tradr.cloud/api/auth/two-factor/disable';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","password":"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://api.tradr.cloud/api/auth/two-factor/disable \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "password": "example" }'Requires the account password AND a valid authenticator code or an unused backup code. On success deletes the secret and every backup code, so the account signs in with the password alone again. A wrong password or code is a single 400 INVALID_CREDENTIALS that does not reveal which failed. Requires an authenticated session; rate limited to 10 management writes per 15 minutes per user; never cached.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
password
required
string
Examplegenerated
{ "code": "example", "password": "example"}Responses
Section titled “ Responses ”Two-factor is now off.
Media typeapplication/json
object
enabled
boolean
Examplegenerated
{ "enabled": true}Validation error, or the password or code is wrong (INVALID_CREDENTIALS).
No authenticated session.
Rate limit exceeded.