Hi All,
Question is can I make HTTP Post using C#? When I do so it says invalid platform. It means I have to make HTTP post using php or node.js only. How can I integrate Zoom with .net based applications? Thanks
Hi All,
Question is can I make HTTP Post using C#? When I do so it says invalid platform. It means I have to make HTTP post using php or node.js only. How can I integrate Zoom with .net based applications? Thanks
Hi Dnyati
Can you provide some code that your using and the complete error message?
Hi,
Below is my code:
string endPoint = @"https://api.zoom.us/v1/meeting/create";
var client = new RestClient();
client.EndPoint = endPoint;
client.Method = HttpVerb.POST;
string PostData = new JavaScriptSerializer().Serialize(new
{
api_key = “_5qbrcDkRQWb7HfQkTrhPA”,
api_secret = “c25ndItvjwuROTcv2t1IgMQ6tvrN7dRpst4n”,
data_type = “JSON”,
host_id = “GC5g5_4-SI6OduvEN0Z5uQ”,
topic = “Altitude”,
type = “1”,
registration_type = “1”,
option_audio = “both”,
option_auto_record_type = “local”
});
txtRequest.Text = PostData;
client.PostData = PostData;
var json = client.MakeRequest();
txtResponse.Text = json;
I also have Rest client class as per reference link. I get below response when I post the request :
{“error”:{“code”:300,“message”:“Api key and secret are required.”}}
I also tried below code to post the request :
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(“https://api.zoom.us/v1/meeting/create”);
request.Method = “POST”;
request.KeepAlive = true;
request.ContentType = “application/x-www-form-urlencoded; charset=UTF-8”;
using (StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
string PostData = new JavaScriptSerializer().Serialize(new
{
api_key = “_5qbrcDkRQWb7HfQkTrhPA”,
api_secret = “c25ndItvjwuROTcv2t1IgMQ6tvrN7dRpst4n”,
data_type = “JSON”,
host_id = “GC5g5_4-SI6OduvEN0Z5uQ”,
topic = “Altitude”,
type = “1”,
registration_type = “1”,
option_audio = “both”,
option_auto_record_type = “local”
});
streamWriter.Write(PostData);
txtRequest.Text = PostData;
}
var httpResponse = (HttpWebResponse)request.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
txtResponse.Text = result;
}
Here also I am receiving same message. Kindly let me know if I miss anything while posting HTTP Request. Thanks
Is what you’re passing into Serialize supposed to be a valid JSON object?
I am able to get response using WebClient but not with HttpWebRequest. Passing same parameters in both the request. Not sure what is the issue with HttpWebRequest. Thanks !