Enroll in TOTP 2FA
POST
/api/v1/auth/2fa/totp/enroll
const url = 'https://api.ultimateteam.ai/api/v1/auth/2fa/totp/enroll';const options = {method: 'POST', headers: {'X-API-Key': '<X-API-Key>'}};
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://api.ultimateteam.ai/api/v1/auth/2fa/totp/enroll \ --header 'X-API-Key: <X-API-Key>'Generate TOTP secret and QR code for authenticator app.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
TOTPEnrollResponse
Response for TOTP enrollment.
object
provisioning_uri
required
Provisioning Uri
string
qr_code_base64
required
Qr Code Base64
string
secret
required
Secret
string
Examplegenerated
{ "provisioning_uri": "example", "qr_code_base64": "example", "secret": "example"}