I'm making a simple integration with telegram-bot to send messages to a channel. The code below is working locally, but when I try it live it gives me this error.
Code
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3;
string urlString = $"https://api.telegram.org/bot{apilToken}/sendMessage?chat_id={destID}&text={text}";
WebClient webclient = new WebClient();
webclient.DownloadString(urlString);
Error
The request was aborted: Could not create SSL/TLS secure channel.
[WebException: The request was aborted: Could not create SSL/TLS secure channel.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +298
System.Net.WebClient.DownloadString(Uri address) +106
System.Net.WebClient.DownloadString(String address) +32