Zoom integration with Asp.net mvc

When I create zoom meeting using ASP.NET mvc response return error message

"The underlying connection was closed: An unexpected error occurred on a send."

The c# code as bellow

var client = new RestClient("https://api.zoom.us/v2/users/MyEmail/meetings");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer JWT_Token");
request.AddHeader("connection", "keep-alive");
request.AddParameter("application/json", "{\"host_id\" : \"MyHostID\",\"type\" : \"1\",\"topic\" : \"Meeting Topic\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

The Api is run on postman with same parameter and work successfully. What is the expected error? If there any helpfull link or good example to integrate zoom in mvc app

You may need to add something similar to the following in .Net:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 Xor SecurityProtocolType.Tls11 Xor SecurityProtocolType.Tls

where I add this code ?

Anywhere before the code you posted above will work.


Thanks @sales1 for the solution! :slight_smile:

Let us know if you have additional questions @omarseleim!


1 Like