MFA
Disable MFA
Requires a valid TOTP or unused backup code. Local (password) users must also send password.
OIDC-only users omit password.
curl -X POST "//api/auth/mfa/disable" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (API token)" \
-d '{
"code": "example_string",
"password": "example_string"
}'
import requests
import json
url = "//api/auth/mfa/disable"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API token)"
}
data = {
"code": "example_string",
"password": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("//api/auth/mfa/disable", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (API token)"
},
body: JSON.stringify({
"code": "example_string",
"password": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"code": "example_string",
"password": "example_string"
}`)
req, err := http.NewRequest("POST", "//api/auth/mfa/disable", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (API token)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('//api/auth/mfa/disable')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (API token)'
request.body = '{
"code": "example_string",
"password": "example_string"
}'
response = http.request(request)
puts response.body
{
"ok": true
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
POST
/api/auth/mfa/disable
POST
API Key (cookie: slugbase.sid)
slugbase.sidstring
RequiredSession cookie after login
Session cookie after login
Bearer Token (API token)
Bearer Tokenstring
RequiredBearer token (API token) - just enter the token, "Bearer" prefix will be added automatically
Content-Typestring
RequiredThe media type of the request body
Options: application/json
codestring
RequiredTOTP or unused backup code
passwordstring
Required when the user has a local password (omit for OIDC-only)
Request Preview
Response
Response will appear here after sending the request
Authentication
path
parameterstring
RequiredAPI Key for authentication. Session cookie after login
header
Authorizationstring
RequiredBearer token (API token). Authentication token required.
Body
application/json
codestring
RequiredTOTP or unused backup code
passwordstring
Required when the user has a local password (omit for OIDC-only)
Responses
okboolean
Was this page helpful?
Last updated today
Built with Documentation.AI