Create a new TOTP instance for a user.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Request type
The user_id of an active user the TOTP registration should be tied to. You may use an external_id here if one is set for the user.
The expiration for the TOTP instance. If the newly created TOTP is not authenticated within this time frame the TOTP will be unusable. Defaults to 1440 (1 day) with a minimum of 5 and a maximum of 1440.
Successful response
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
The unique ID for a TOTP instance.
The TOTP secret key shared between the authenticator app and the server used to generate TOTP codes.
The QR code image encoded in base64.
The recovery codes used to authenticate the user without an authenticator app.
The user object affected by this API call. See the Get user endpoint for complete response field details.
The unique ID of the affected User.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.