Users

Get the QR code for the authenticated user's 2FA enrolment

Returns a fresh QR code the user can scan with their authenticator app to register the shared secret. The QR code is returned both as an otpauth:// URL and as an inline SVG ready for embedding in HTML.

get/user/two-factor-qr-code

Response

The QR code was successfully retrieved.

urlstring required

The url-encoded otpauth:// URI represented by the QR code.

svgstring required

An inline SVG rendering of the QR code, ready for embedding in HTML.

Example response

{
  "url": "otpauth://totp/Trybe:jane@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Trybe",
  "svg": "<svg></svg>"
}

Changes