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

**URL:** <https://devforum.zoom.us/t/zoom-api-calls-works-in-localhost-but-stops-working-after-hosting-to-iis-asp-net-mvc/60075>\
**Category:** API and Webhooks\
**Created:** [November 10, 2021, 2:06pm UTC](https://devforum.zoom.us/t/zoom-api-calls-works-in-localhost-but-stops-working-after-hosting-to-iis-asp-net-mvc/60075 "2021-11-10T14:06:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryzen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ryzen/32/32540_2.png) [@Ryzen](https://devforum.zoom.us/u/Ryzen)\
**Post date:** [November 10, 2021, 2:06pm UTC](https://devforum.zoom.us/t/zoom-api-calls-works-in-localhost-but-stops-working-after-hosting-to-iis-asp-net-mvc/60075/1 "2021-11-10T14:06:54Z")

</div>

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

```auto
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),
                        SecurityAlgorithms.HmacSha256),

                    };
                    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

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 15, 2021, 9:56am UTC](https://devforum.zoom.us/t/zoom-api-calls-works-in-localhost-but-stops-working-after-hosting-to-iis-asp-net-mvc/60075/2 "2021-11-15T09:56:20Z")

</div>

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?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 15, 2021, 7:56pm UTC](https://devforum.zoom.us/t/zoom-api-calls-works-in-localhost-but-stops-working-after-hosting-to-iis-asp-net-mvc/60075/3 "2021-12-15T19:56:27Z")

</div>

Closed on December 15, 2021, 7:56pm UTC

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