Verify a Phone Number
A 3-step recipe with Twilio. We can help you get access.
Recipe · 3 steps
Verify a Phone Number
with Twilio
Create a Verify service, send a verification, and confirm the code.
- Create (provision) a Verify service to configure verification behavior such as code length and branding.
- Start a verification on the newly created service, sending a one-time code to the target phone number over the chosen channel.
- Check the code the user entered against the pending verification to confirm ownership of the phone number.
What you'll need to have ready
- friendlyName: Human-readable name for the Verify service, shown in verification messages.
- phoneNumber: The phone number to verify, in E.164 format. Example uses Twilio's magic test number.
- channel: Delivery channel - one of sms, call, email, whatsapp, or sna.
- code: The one-time verification code the user received and entered.
For your developer
Arazzo workflow twilio:verify-phone-number, 3 operations: createService → createVerification → createVerificationCheck. Specs on APIs.io.