I want create a meeting to MVC and C#

Hello.

I trying the create a meeting use the JWT API.

So I need advice to MVC and C#

Please see below :face_with_monocle:
ASP.NET (CSHTML)
function fnZoom(){
$.ajax({
type: “POST”
, contentType: “application/json”
, url: “/~~/~~/ZoomToken”
, success: function (result) {
console.log(“OK” + result);
}
});
}

C#
public ActionResult ZoomToken()
{
var tokenString = {JWT Token};
var client = new RestClient(“https://api.zoom.us/v2/users/rhsong@besthc.co.kr/meetings”);
var request = new RestRequest(Method.POST);
request.AddHeader(“content-type”, “application/json”);
request.AddHeader(“authorization”, String.Format(“Bearer {0}”, tokenString));
request.AddParameter(“application/json”, “{\“topic\” : \“TEST\”,\“type\” : \“2\”,\“start_time\” : \“2020-11-05T10:00:00Z\”,\“timezone\”:\“Asia/Seoul\”,\“agenda\”:\“test\”,\“settings\”:{\“host_video\”:\“true\”,\“mute_upon_entry\”:\“true\”,\“approval_type\”:\“1\”,\“audio\”:\“both\”,\“auto_recording\”:\“none\”}}”, ParameterType.RequestBody);

IRestResponse response = client.Execute(request);

return View();
}

Thanks.

Hey @rhsong,

The Zoom API cannot be called in the frontend. You will receive CORs errors.

We do however have C# sample code for calling the Zoom API! :slight_smile:

Let me know if that helps!

Thanks,
Tommy