Discussions

Ask a Question
Back to All

C# RestSharp "Could not create SSL/TLS secure channel"

Using framework 4.6.1 with TLS1.2
I have integrated RestSharp with Zoom, but not with boomset. I've exhausted my online search for code adjustments. Here is where I have left off:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
var client = new RestClient("https://api.boomset.com/groups");
var certFile = "C:\\iMIS\Godaddy2022.pfx";
System.Security.Cryptography.X509Certificates.X509Certificate2 certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2(certFile, "password");
client.ClientCertificates = new System.Security.Cryptography.X509Certificates.X509CertificateCollection() { certificate };
client.Proxy = new WebProxy();
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "/");
request.AddHeader("Accept-Encoding", "gzip, deflate, br");
request.AddHeader("Connection", "keep-alive");
request.AddHeader("Authorization", "Token 8a22d14aedda9620bcb3d91ab927d5b0");
request.AddHeader("Cache-Control", "no-cache");
request.RequestFormat = DataFormat.Json;
IRestResponse response = client.Execute(request);