Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

PhoneNumber verification

These are all methods on the PhoneNumber class that allow you to verify a user's phone number.

prepareVerification()

Kick off the verification process for this phone number. An SMS message with a one-time code will be sent to the phone number value.

function prepareVerification(): Promise<PhoneNumber>;

attemptVerification()

Attempts to verify this phone number, passing the one-time code that was sent as an SMS message. The code will be sent when calling the PhoneNumber.prepareVerification() method.

function attemptVerification(params: AttemptPhoneNumberVerificationParams): Promise<PhoneNumber>;

AttemptPhoneNumberVerificationParams

NameTypeDescription
codestringThe one-time code that was sent to the user's phone number when prepareVerification was called.

Last updated on October 5, 2023

What did you think of this content?

Clerk © 2024