Sign-up user for TOTP second factor.
GET
/api/auth/v1/totp/register
const url = 'https://example.com/api/auth/v1/totp/register';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/auth/v1/totp/registerResponses
Section titled “ Responses ”TOTP secret and QR code URI.
Media type application/json
object
png
string | null
totp_url
required
string
Example generated
{ "png": "example", "totp_url": "example"}