Iniciar el desafío de MFA
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"
}Iniciar el desafío de MFA
Utiliza este endpoint para solicitar un nuevo código de verificación de MFA enviado por correo electrónico o SMS. Es útil cuando el usuario necesita un código nuevo o quiere cambiar a un método de MFA distinto.
Requiere un mfaToken válido obtenido desde el endpoint de token de acceso.
POST
/
v1
/
login
/
mfa
/
challenge
Iniciar el desafío de MFA
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"
}Cuerpo
application/json
Información utilizada para solicitar un nuevo código de verificación de MFA por correo electrónico o SMS.
Respuesta
El desafío de MFA se inició correctamente. Se ha enviado un código de verificación por el método solicitado.
Confirmación de que el desafío se inició correctamente.
¿Esta página le ayudó?
⌘I

