I want to implement phone number validation which checks whether phone number exist or does not exist.
I did this
Imports Twilio.Lookups
If Not File.Exists("list.txt") Then
MsgBox("insert phone numbers to list.txt")
Return
Else
Dim list() As String = File.ReadAllLines("list.txt")
ListBox1.Items.AddRange(list)
End If
Dim accountSid As String = "AC862c52baff7d8ef72c9e4c04f828fa03"
Dim authToken As String = "xxxxxxxxxxxx"
Dim lookups As New LookupsClient(accountSid, authToken)
For Each str4 In ListBox1.Items
Dim phoneNumber = lookups.GetPhoneNumber(str4, True)
If ((((Not phoneNumber.Carrier Is Nothing) AndAlso (Not phoneNumber.Carrier.Name Is Nothing)) AndAlso ((Not phoneNumber.NationalFormat Is Nothing) AndAlso (Not phoneNumber.PhoneNumber Is Nothing))) AndAlso (Not phoneNumber.CountryCode Is Nothing)) Then
Console.WriteLine(phoneNumber.Carrier.Name)
ElseIf (Not phoneNumber.RestException Is Nothing) Then
Console.WriteLine(phoneNumber.RestException.Message)
Else
Console.WriteLine("Phone number was correct, although the carrier who owns it was not found.")
End If
Next
but this only does carrier lookup, it does not check if the actual phone number exists.