Update meetings get status code “ok” but meeting not any changes?
System.Net.HttpWebRequest request = System.Net.HttpWebRequest.Create("https://api.zoom.us/v2/users/me/meetings/" + rootMeetings.id) as System.Net.HttpWebRequest;
request.Method = "PATCH";
request.ContentType = "application/json"; //formatting the search string so that it wont give media type error
request.MediaType = "application/json";
request.Accept = "application/json";
request.KeepAlive = true;
//request.Headers.Add("Content-type", "application/json");
request.Headers.Add("authorization", "Bearer " + this.Token);
DateTime startTime;
if (DateTime.TryParse(rootMeetings.start_time, out startTime))
{
rootMeetings.start_time = startTime.ToString("s")+"Z";
}
string json = Newtonsoft.Json.JsonConvert.SerializeObject(new
{
topic = rootMeetings.topic,
agenda = rootMeetings.agenda,
start_time = rootMeetings.start_time,
duration = rootMeetings.duration.ToString(),
type=2
});
ZoomAPITracker zoomAPITracker = new ZoomAPITracker() { RequestData = json };
AddAPITracker(zoomAPITracker);
try
{
byte[] data = System.Text.Encoding.ASCII.GetBytes(json);
request.ContentType = "application/json";
request.ContentLength = data.Length;
//ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
System.IO.Stream newStream = request.GetRequestStream();
newStream.Write(data, 0, data.Length);
newStream.Close();
// instantiate a new response object
System.Net.HttpWebResponse response = request.GetResponse() as System.Net.HttpWebResponse;
zoomAPITracker.MeetingId = rootMeetings.id.ToString();
zoomAPITracker.ResponseData = response.StatusDescription;
AddAPITracker(zoomAPITracker);
if ((int)response.StatusCode==200)
{
var updateMeetings = GetMeetingById(rootMeetings.id).Data;
return new AddUpdateDelete<ResponseRootMeetings>() { Status = true, Data = updateMeetings };
}
return new AddUpdateDelete<ResponseRootMeetings>() { Status = false};
}
catch (Exception ex)
{
return new AddUpdateDelete<ResponseRootMeetings>() { Status = false };
}
Error
Not update meeting data
version 2