# Everytime I want to connect Glide table API, I got error code (-1)

**URL:** <https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268>\
**Category:** Ask for Help\
**Tags:** api\
**Created:** [October 25, 2023, 4:31am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268 "2023-10-25T04:31:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeonghwan\_You](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeonghwan_you/32/65566_2.png) [@Jeonghwan\_You](https://community.glideapps.com/u/Jeonghwan_You)\
**Post date:** [October 25, 2023, 4:31am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/1 "2023-10-25T04:31:03Z")

</div>

I am trying to update the data measured by ESP32-CAM using Glide table API. However, every time I use the POST method, I get the message ‘connection refused’ with the httpReponseCode displayed as -1.

The code I used for ESP32-CAM is shown below. The ROW ID of the Glide table is always the same, so I used a fixed value.

here is api url  
const char\* apiUrl = “[https://api.glideapp.io/api/function/mutateTables](https://api.glideapp.io/api/function/mutateTables)”;

and other code is in below

 ![Screenshot 2023-10-25 at 11.23.59 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/0/2092ac21d6d55fbf1bb4fc77ee4ea5f5bb814f3d.jpeg)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 25, 2023, 5:27am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/2 "2023-10-25T05:27:02Z")

</div>

What response do you get if you use the curl example (in a terminal) with the same values?

---

<div class="post-metadata">

**Author:** ![Jeonghwan\_You](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeonghwan_you/32/65566_2.png) [@Jeonghwan\_You](https://community.glideapps.com/u/Jeonghwan_You)\
**Post date:** [October 25, 2023, 7:58am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/3 "2023-10-25T07:58:23Z")

</div>

> [@Darren\_Murphy](#):
>
> use the curl example

Thank you. When I use curl in “[https://reqbin.com/curl](https://reqbin.com/curl)” here. I got this result below.

 ![Screenshot 2023-10-25 at 2.57.07 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b6101d8c537729534bab02851a1cf6cd9a00e431.png)

And I can see the value I request using curl in Glide table.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 25, 2023, 8:20am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/4 "2023-10-25T08:20:46Z")

</div>

Okay.

A -1 response I believe suggests some sort of connection problem. Are both tests going through the same network gateway? Could there be a firewall or similar getting in the way?

---

<div class="post-metadata">

**Author:** ![Jeonghwan\_You](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeonghwan_you/32/65566_2.png) [@Jeonghwan\_You](https://community.glideapps.com/u/Jeonghwan_You)\
**Post date:** [October 25, 2023, 8:42am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/5 "2023-10-25T08:42:32Z")

</div>

I think so. I use same WiFi SSID to test this one but can not sure about gateway, firewall.  
Sorry I have lack of knowledge about sorts of things.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 25, 2023, 8:48am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/6 "2023-10-25T08:48:50Z")

</div>

> [@Jeonghwan\_You](#):
>
> Thank you. When I use curl in “[https://reqbin.com/curl”](https://reqbin.com/curl%E2%80%9D) here. I got this result below.

When you do that, the request is being sent from [reqbin.com](http://reqbin.com), not from your local machine.

What sort of machine are you using? Windows, Mac?  
You need to open a terminal console on your local machine and send the curl request from there, and see if you get the same response.

---

<div class="post-metadata">

**Author:** ![Jeonghwan\_You](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeonghwan_you/32/65566_2.png) [@Jeonghwan\_You](https://community.glideapps.com/u/Jeonghwan_You)\
**Post date:** [October 25, 2023, 9:09am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/7 "2023-10-25T09:09:44Z")

</div>

Wow now I can use cURL on my terminal in Mac.  
When I input same commend that I use [reqbin.com/curl](http://reqbin.com/curl), I got this result (below image). And the table is updated with my value ‘10’. It works.

 ![Screenshot 2023-10-25 at 4.06.43 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2ab848e08728edbc8722def199835549549d68b8.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 25, 2023, 9:18am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/8 "2023-10-25T09:18:13Z")

</div>

Okay, so that seems to rule out a network issue.  
So there must be something not right with the request that your program sends.

Is there any way that you can log the HTTP Request and Response payloads so that you can see more detail?

If you are familiar with `tcpdump`, you could run that in a terminal and capture the raw packets.

---

<div class="post-metadata">

**Author:** ![Jeonghwan\_You](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeonghwan_you/32/65566_2.png) [@Jeonghwan\_You](https://community.glideapps.com/u/Jeonghwan_You)\
**Post date:** [October 25, 2023, 10:50am UTC](https://community.glideapps.com/t/everytime-i-want-to-connect-glide-table-api-i-got-error-code-1/67268/9 "2023-10-25T10:50:43Z")

</div>

> [@Darren\_Murphy](#):
>
> tcpdump

Sorry. I am not familiar with tcpdump.  
Now I solve this problem with webhoo on [make.com](http://make.com) again.
