Skip to main content
POST
/
api
/
v1
/
auth
/
2fa
/
backup-codes
/
regenerate
Regenerate Backup Codes
curl --request POST \
  --url https://api.example.com/api/v1/auth/2fa/backup-codes/regenerate \
  --header 'Authorization: Bearer <token>'
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.example.com/api/v1/auth/2fa/backup-codes/regenerate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.example.com/api/v1/auth/2fa/backup-codes/regenerate"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
{
  "codes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200 - application/json

OK

codes
string[]
required