provider Totp POST /v1/totps
@utdk/stytch /v1/totps
Create
Create a new TOTP instance for a user. The user can use the authenticator application of their choice to scan the QR code or enter the secret.

Try it

Authentication
Configure credentials for Stytch API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

apiTotpV1Create
POST/v1/totps
Create a new TOTP instance for a user. The user can use the authenticator application of their choice to scan the QR code or enter the secret.

Input

required

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.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stytch from '@utdk/stytch';

await stytch.apiTotpV1Create()