Twilio Examples

Validate Number

If you plan to store the phone number after validating, we recommend storing the full E.164 formatted number returned in the phone number field. Most other Twilio services require the E.164 format for phone numbers.


const result = await account.lookups.v1.phoneNumbers(phoneNumber).fetch({ countryCode, inputTypes });