i am working to integrate the zoom api in mvc application, but i am unable to execute the Zoom api/url in c#,
there is a url which i execute in browser it's the Authorize code which is display in url,
but when i try to execute the same url in c# code, i am getting or not getting that code.
please look the following code:
What I have tried:
1) this url return the Authorize code in Url section, but i need that code in code behind.
https://zoom.us/oauth/authorize?response_type=code&client_id=zoLFwEBtT1WxV344QbPheQ&redirect_uri=https://marketplace.zoom.us/DApp
2) same code try to execute in c# code behind, not getting that code(status code 200 without authorize code)
using (var client = new HttpClient())
{
var clientCode = "";
client.DefaultRequestHeaders.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage res = await client.GetAsync("https://zoom.us/oauth/authorize?response_type=code&client_id=zoLFwEBtT1WxV344QbPheQ&redirect_uri=https://marketplace.zoom.us/DApp");
if (res.IsSuccessStatusCode)
{
clientCode = res.Content.ReadAsStringAsync().Result;
}
}
3) this is show status code 0
var client = new RestClient("https://zoom.us/oauth/authorize?response_type=code&client_id=zoLFwEBtT1WxV344QbPheQ&redirect_uri=https://marketplace.zoom.us/DApp");
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
IRestResponse response = client.Execute(request);