This is the error I am getting while trying to send the message.
An unhandled exception of type 'Twilio.Exceptions.ApiException' occurred in Twilio.dll
Additional information: Upgrade Required
My code is:
const string accountSid = "Value";
const string authToken = "Value";
TwilioClient.Init(accountSid, authToken);
var to = new PhoneNumber("+whatsapp:+13233633791");
var message = MessageResource.Create(
to,
from: new PhoneNumber("+whatsapp:+12037179461"),
body: "Hi Joe! Your order D45987AB will arrive on 8/12/2018 before 8 pm.");
Console.WriteLine(message.Sid);
Manage and Configure Your WhatsApp-enabled Twilio Numbers To manage your own templates and your WhatsApp profile, go to Messaging > Senders > WhatsApp Senders in the Console. Here, you can see the list of your WhatsApp-enabled Twilio phone numbers (senders) as well as any templates that you have submitted for approval.
The Twilio API for WhatsApp is the quickest way to add two-way messaging on WhatsApp into your web application. With the same Twilio API you use for SMS, you can easily add WhatsApp capabilities to your application by changing just two lines of code.
Per their docs, Twilio APIs now requires TLS v1.2 and string cipher suites.
Inside your method, before MessageResource.Create() is invoked, add
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With