Enroll TOTP
POST
/api/v1/auth/totp/enroll
const url = 'https://example.com/api/v1/auth/totp/enroll';const options = { method: 'POST', headers: { cookie: 'ttx_access_token=<ttx_access_token>', 'X-CSRF-Token': '<X-CSRF-Token>' }};
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/v1/auth/totp/enroll \ --header 'X-CSRF-Token: <X-CSRF-Token>' \ --cookie ttx_access_token=<ttx_access_token>Start enrolling an authenticator app: a new secret and its QR data.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
TotpEnrollResponse
object
provisioning_uri
required
Provisioning Uri
string
Example generated
{ "provisioning_uri": "example"}