Overview
Verifies a passwordless authentication code and completes the sign-in process. Creates a new user if one doesn’t exist.Request Body
Required:preAuthSessionId(string): The session identifier from code creation
linkCode(string): The magic link codedeviceId+userInputCode: For manual code entrydeviceId(string): The device identifieruserInputCode(string): The code entered by the user
Response
Success Response (200)
createdNewUser: Whether a new user was createduser: The authenticated user objectrecipeUserId: Recipe-specific user ID (CDI >= 4.0)consumedDevice: Information about the device that was verified
Error Responses
RESTART_FLOW_ERROR (200)
The authentication flow must be restarted. This can happen if:- The device was used for too many failed attempts
- The preAuthSessionId is invalid
EXPIRED_USER_INPUT_CODE_ERROR (200)
The code has expired.INCORRECT_USER_INPUT_CODE_ERROR (200)
The code is incorrect.Examples
Consume with link code
Consume with user input code
Notes
- You must provide exactly one of:
linkCodeOR (deviceId+userInputCode) - Failed attempts are tracked per device
- After maximum failed attempts, the flow must be restarted
- Email verification status is set automatically (CDI >= 4.0)
- The API automatically handles user ID mapping for external user IDs
- Active user tracking is updated upon successful authentication