POST /api/me/2fa/confirm — confirm enrolment with a live code, arm 2FA, and return the one-time recovery codes (shown to the user exactly once).
POST
/api/me/2fa/confirm
const url = 'https://example.com/api/me/2fa/confirm';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/me/2fa/confirm \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”Media typeapplication/json
POST /me/2fa/confirm response — the one-time recovery codes (shown once).
object
recovery_codes
required
Array<string>
Examplegenerated
{ "recovery_codes": [ "example" ]}