Zoom api calls works in localhost but stops working after hosting to iis Asp.net Mvc

Hi im working on an ASP.NET MVC app that books Zoom meetings on behalf of clients and sends links to attendees via email, below is my code

var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
                    var now = DateTime.Now;
                    var apiSecret = "key";
                    byte[] symmetricKey = Encoding.ASCII.GetBytes(apiSecret);

                    var tokenDescriptor = new SecurityTokenDescriptor
                        Issuer = "issuer key",
                        Expires = now.AddDays(1),
                        SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(symmetricKey),

                    var token = tokenHandler.CreateToken(tokenDescriptor);
                    var tokenString = tokenHandler.WriteToken(token);

                    //create req

                    var client = new RestClient("https://api.zoom.us/v2/users/me/meetings");
                    var request = new RestRequest(Method.POST);
                    request.RequestFormat = DataFormat.Json;
                    request.AddJsonBody(new { topic = apply.SubjectDetail, duration = "90", start_time = apply.start_date, type = "2" });
                    request.AddHeader("authorization", String.Format("Bearer {0}", tokenString));

                    // response

                    IRestResponse restResponse = client.Execute(request);
                    HttpStatusCode statusCode = restResponse.StatusCode;
                    int numericStatusCode = (int)statusCode;
                    var jObject = JObject.Parse(restResponse.Content);
                    var HostText = (string)jObject["start_url"];
                    var JoinText = (string)jObject["join_url"];
                    var CodeText = Convert.ToString(numericStatusCode);

This works without any problem and I get a link via mail when testing on localhost

however after hosting the app to iis there is no link in the email anymore

what could be the problem? please help

Hi @Ryzen,

Are you receiving any errors? Have you tried adding some logging in your code so that you can see where the issue is happening?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.