curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/challenge \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload := strings.NewReader("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"app\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'app'})
};
fetch('https://auth.sandbox.lerian.net/v1/login/mfa/challenge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "MFA challenge initiated"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Initiate an MFA challenge
Use this endpoint with mfaType: email to request a new verification code sent via email. The API also accepts app, but it does not send a code for that method: authenticator apps generate passcodes locally. Clients using an authenticator app can proceed directly to verification.
Requires a valid mfaToken obtained from the access token endpoint.
curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/challenge \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload := strings.NewReader("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"app\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'app'})
};
fetch('https://auth.sandbox.lerian.net/v1/login/mfa/challenge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "app"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "MFA challenge initiated"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Body
Short-lived MFA session token issued when a login requires MFA.
"eyJhbGciOiJIUzI1NiJ9..."
Use email to send a verification code. The app value is accepted but does not send a code; authenticator apps generate passcodes locally.
app, email "app"
Response
The challenge request succeeded. For email, a verification code was sent. For app, no code is sent.
Human-readable acknowledgement that the challenge was dispatched.
"MFA challenge initiated"
Was this page helpful?

