Report whether the caller has a second factor
curl --request GET \
--url https://app.trustivan.com/api/v1/auth/mfa \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/auth/mfa"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/auth/mfa', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/mfa"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Report whether the caller has a second factor
Reports enrolment state and how many recovery codes remain unused, so the dashboard can warn before the last one is spent.
GET
/
auth
/
mfa
Report whether the caller has a second factor
curl --request GET \
--url https://app.trustivan.com/api/v1/auth/mfa \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/auth/mfa"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/auth/mfa', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/mfa"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Authorizations
Response
The caller's second-factor status.