sendPhoneCode

suspend fun SignIn.sendPhoneCode(phoneNumberId: String? = null): ClerkResult<SignIn, ClerkErrorResponse>

Sends a verification code to the user's phone number for first factor authentication.

This is a convenience method that prepares the phone code verification strategy. The verification code will be sent via SMS to the phone number associated with the sign-in.

Return

A ClerkResult containing the updated SignIn object on success, or a ClerkErrorResponse on failure.

Parameters

phoneNumberId

Optional ID of the phone number to send the code to. If not provided, the phone number ID will be automatically retrieved from the supported first factors.