curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirmimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm', 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/enroll/totp/confirm",
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/enroll/totp/confirm"
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/enroll/totp/confirm")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm")
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{
"confirmed": false,
"recovery_codes": [
"string"
],
"access_token": "string",
"token_type": "string",
"expires_in": 0
}"string""string""string"Confirm authenticator-app (TOTP) enrollment and complete a forced-2FA login.
Post the enrollment token (from POST /api/v1/tokens), the challenge
token (from .../enroll/totp/begin), and the current code from the
user’s authenticator app:
{ "enrollment_token": "eyJ...", "challenge_token": "eyJ...", "code": "123456" }
On success authenticator-app 2FA is enabled and login completes — the response carries the final access token plus the user’s one-time recovery codes:
{
"confirmed": true,
"recovery_codes": ["abcd-efgh-ijkl", "..."],
"access_token": "eyJ...",
"token_type": "Bearer",
"expires_in": 31536000
}
Show the recovery_codes to the user once — they are not returned
again. An incorrect code returns 400 (invalid_grant); an expired
challenge returns 410 (challenge_expired). Rate limited to 10
requests per minute (429).
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirmimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm', 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/enroll/totp/confirm",
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/enroll/totp/confirm"
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/enroll/totp/confirm")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/two-factor/enroll/totp/confirm")
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{
"confirmed": false,
"recovery_codes": [
"string"
],
"access_token": "string",
"token_type": "string",
"expires_in": 0
}"string""string""string"Query Parameters
Response
Enrollment confirmed; the access token and recovery codes are returned.
Returned from the mid-login enrollment confirm endpoints (POST /api/v1/tokens/two-factor/enroll/{email|totp}/confirm) once the user has proven control of the new mechanism. Completes a forced-enrollment login: it both finalizes the JWT access token and surfaces the freshly generated recovery codes. The property names are snake_case to match the wire format of the other token endpoints (see TokenPayload).
Always true on a success response; the enrollment is now active.
The user's recovery codes, generated as part of first-time enrollment. These are shown once and never returned again — prompt the user to store them somewhere safe. Each code is single-use at POST /api/v1/tokens/two-factor/recovery.
The JWT access token. Use it as Authorization: bearer {access_token} for subsequent API calls — login is complete.
Always Bearer.
Seconds until the access token expires.