Initiate MFA Challenge
curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/challenge \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "email"
}
'import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "email"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'email'})
};
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.sandbox.lerian.net/v1/login/mfa/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mfaToken' => 'eyJhbGciOiJIUzI1NiJ9...',
'mfaType' => 'email'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}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\": \"email\"\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))
}HttpResponse<String> response = Unirest.post("https://auth.sandbox.lerian.net/v1/login/mfa/challenge")
.header("Content-Type", "application/json")
.body("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"email\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.sandbox.lerian.net/v1/login/mfa/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"email\"\n}"
response = http.request(request)
puts response.read_body{
"message": "MFA challenge initiated"
}Initiate MFA Challenge
Use this endpoint to request a new MFA verification code sent via email or SMS. This is useful when the user needs a fresh code or wants to switch to a different MFA method.
Requires a valid mfaToken obtained from the access token endpoint.
POST
/
v1
/
login
/
mfa
/
challenge
Initiate MFA Challenge
curl --request POST \
--url https://auth.sandbox.lerian.net/v1/login/mfa/challenge \
--header 'Content-Type: application/json' \
--data '
{
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "email"
}
'import requests
url = "https://auth.sandbox.lerian.net/v1/login/mfa/challenge"
payload = {
"mfaToken": "eyJhbGciOiJIUzI1NiJ9...",
"mfaType": "email"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mfaToken: 'eyJhbGciOiJIUzI1NiJ9...', mfaType: 'email'})
};
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));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.sandbox.lerian.net/v1/login/mfa/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mfaToken' => 'eyJhbGciOiJIUzI1NiJ9...',
'mfaType' => 'email'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}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\": \"email\"\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))
}HttpResponse<String> response = Unirest.post("https://auth.sandbox.lerian.net/v1/login/mfa/challenge")
.header("Content-Type", "application/json")
.body("{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"email\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://auth.sandbox.lerian.net/v1/login/mfa/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mfaToken\": \"eyJhbGciOiJIUzI1NiJ9...\",\n \"mfaType\": \"email\"\n}"
response = http.request(request)
puts response.read_body{
"message": "MFA challenge initiated"
}Body
application/json
Response
The MFA challenge was initiated. A verification code has been sent through the requested method.
Confirmation that the challenge was initiated.
Was this page helpful?
⌘I

