# Zoom API: Unable to connect to the remote server

**URL:** <https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333>\
**Category:** API and Webhooks\
**Created:** [August 24, 2021, 8:26am UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333 "2021-08-24T08:26:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![soas\_dev](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@soas\_dev](https://devforum.zoom.us/u/soas_dev)\
**Post date:** [August 24, 2021, 8:26am UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333/1 "2021-08-24T08:26:16Z")

</div>

Hi, I’m currently creating a WebAPI that retrieves the details of a meeting via ASP .Net. But during production (Working fine during debug stage), I keep getting an error “ **Unable to connect to the remote server** ”.

```auto
// GET api/<controller>/5
        public HttpResponseMessage Get(long id)
        {
            var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
            var now = DateTime.UtcNow;
            var apiSecret = Global.API_SECRET; //-- API Secret--//
            byte[] symmetricKey = Encoding.ASCII.GetBytes(apiSecret);

            var tokenDescriptor = new SecurityTokenDescriptor
            {
                Issuer = Global.API_KEY, //-- API Key--//
                Expires = now.AddSeconds(300),
                SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(symmetricKey), SecurityAlgorithms.HmacSha256),
            };

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

            try
            {
                var responseString = "";
                var request = (HttpWebRequest)WebRequest.Create(String.Format("https://api.zoom.us/v2/report/meetings/{0}", id));

                request.Headers.Add("authorization", String.Format("Bearer {0}", tokenString));
                request.Method = "GET";
                request.ContentType = "application/json";

                using (var response1 = request.GetResponse())
                {
                    using (var reader = new StreamReader(response1.GetResponseStream()))
                    {
                        responseString = reader.ReadToEnd();
                    }
                }

                return Request.CreateResponse(HttpStatusCode.OK, responseString);
            }
            catch (Exception ex)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message);
            }
        }

```

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/5/7/574ed4649172d63b9ddcafa86c31a192361bdbc0.png)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 25, 2021, 10:53pm UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333/2 "2021-08-25T22:53:42Z")

</div>

Hey @soas_dev,

Thank you for reaching out to the Zoom Developer Forum. Do you have firewall rules on your production server that might be preventing your application from connecting to the API?

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![soas\_dev](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@soas\_dev](https://devforum.zoom.us/u/soas_dev)\
**Post date:** [August 27, 2021, 8:57am UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333/3 "2021-08-27T08:57:14Z")

</div>

So I was able to resolve the issue by whitelisting the zoom api link on the server. Thank you!

---

<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:** [August 30, 2021, 12:25pm UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333/4 "2021-08-30T12:25:53Z")

</div>

Glad Max could 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:** [August 30, 2021, 12:25pm UTC](https://devforum.zoom.us/t/zoom-api-unable-to-connect-to-the-remote-server/56333/5 "2021-08-30T12:25:55Z")

</div>

Closed on August 30, 2021, 12:25pm UTC


