Overview
To resend a passwordless code, use the Create Code endpoint with thedeviceId parameter.
How It Works
When you call the Create Code endpoint with an existingdeviceId, it generates a new code for that device while maintaining the same authentication session. This is the recommended way to implement code resend functionality.
Request
Response
Same as Create Code:Example
Implementation Example
Notes
- The
deviceIdmust be from a valid, active authentication session - The
preAuthSessionIdremains the same across resends - Failed verification attempts are tracked across all codes for the device
- If the device is invalid or expired, you’ll receive a
RESTART_FLOW_ERROR - Each resend generates a new
userInputCodeandlinkCode - The previous code is invalidated when a new one is created