Complete login with a two-factor recovery code.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recoveryimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery', 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://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "string",
"authentication_callback_url": "string",
"expires_in": 0,
"id_token": "string",
"refresh_token": "string",
"token_type": "string"
}"string""string"Two-factor
Complete login with a two-factor recovery code.
A fallback for users who cannot produce their primary code but still
have a recovery code on file (see recovery_codes_available on the
login response). Post the challenge token together with one recovery
code:
{ "challenge_token": "eyJ...", "recovery_code": "abcd-efgh-ijkl" }
On success the response is 200 with the final access token, in the
same shape as POST /api/v1/tokens. Each recovery code is single-use.
An incorrect code returns 400 (invalid_grant); an expired
challenge returns 410 (challenge_expired). Rate limited to 10
requests per minute (429).
Used by the embed login widget; the hosted Razor flow has its own equivalent action on the AuthenticationController.
POST
/
api
/
v1
/
tokens
/
two-factor
/
recovery
Complete login with a two-factor recovery code.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recoveryimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery', 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://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/recovery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "string",
"authentication_callback_url": "string",
"expires_in": 0,
"id_token": "string",
"refresh_token": "string",
"token_type": "string"
}"string""string"