I tried to send SMS using the sample code from the twilio website but I am getting an error "Invalid TLS protocol". I had used valid accountsid, authtoken and verified mobile numbers.
class Program
{
static void Main(string[] args)
{
string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");
TwilioClient.Init(accountSid, authToken);
var message = MessageResource.Create(
body: "Hi there",
from: new Twilio.Types.PhoneNumber("+15017122661"),
to: new Twilio.Types.PhoneNumber("+15558675310")
);
Console.WriteLine(message.Sid);
}
}