Skip to main content
totp.create wraps the Create TOTP endpoint. Call this method to create a TOTP registration on an existing .

Parameters

string
required
Globally unique UUID that identifies a specific Organization. You may also use the organization_slug or organization_external_id here as a convenience.
string
required
Globally unique UUID that identifies a specific Member. You may use an external_id here if one is set for the member.
number
The expiration for the TOTP registration. If the newly created TOTP registration is not authenticated within this time frame the member will have to restart the registration flow. Defaults to 60 (1 hour) with a minimum of 5 and a maximum of 1440.

Response

string
The TOTP secret key shared between the authenticator app and the server used to generate TOTP codes.
string
The unique ID for a TOTP instance.
string
The QR code image encoded in base64.
string[]
An array of recovery codes that can be used to recover a Member’s account.
string
Globally unique UUID that identifies a specific Member.
object
string
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.
number
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.