New recovery codes in place of the old ones (needs step-up level 2).
POST
/api/admin/two-factor/recovery-codes
const url = 'https://example.com/api/admin/two-factor/recovery-codes';const options = {method: 'POST'};
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/admin/two-factor/recovery-codesResponses
Section titled “Responses”OK
Media typeapplication/json
object
codes
required
Array<string>
Example generated
{ "codes": [ "example" ]}