# Getting 'Unauthorized' Error when pushing data to Edit Rows API

**URL:** <https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412>\
**Category:** Ask for Help\
**Created:** [April 11, 2023, 1:06pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412 "2023-04-11T13:06:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 11, 2023, 1:06pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/1 "2023-04-11T13:06:16Z")

</div>

Hello,

@Vishal_Chatre and I are working on a payment gateway integration with our app. We have manged to send the relevant data from glide tables to make and made an HTTP call to the payment gateway website.

We have been able to reach the stage where - **the first HTTP call generates the payment link and the gateway in the output of the HTTP call sends data.**

Now, we want to pass this data back to our glide tables so that the customers gets a real time payment gateway screen

We connected another HTTP request to the prev HTTP request.

 ![Screenshot 2023-04-11 at 6.31.44 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41a9e884d8716d753b514be3e2252cd0853d859c.png)

However, in the second HTTP call, we are getting the following error -

![Screenshot 2023-04-11 at 6.23.25 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/aeb2492f02e0af7e6d4d227a99b022eb1218b5df.png)

What should we do?

Thanks,

---

<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:** [April 11, 2023, 1:34pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/2 "2023-04-11T13:34:46Z")

</div>

Are you sending the correct API token in the request headers?

Can you show a screen shot of your HTTP module configuration? (be sure to redact your token value if it is there).

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 11, 2023, 2:10pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/3 "2023-04-11T14:10:32Z")

</div>

Thanks for your response, Darren!

pfa the screenshot

 ![Screenshot 2023-04-11 at 7.38.46 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/f/cf9dc4030594f9ad71d11c12cd95316418eb7f74.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:** [April 11, 2023, 2:31pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/4 "2023-04-11T14:31:22Z")

</div>

You are missing `Content-Type: application/json` in your request header.

If fixing that doesn’t resolve the issue, then I would suggest carefully checking both your token and App ID values. Make sure they are correct and don’t contain any trailing spaces.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 12, 2023, 12:06am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/5 "2023-04-12T00:06:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/4/e48fe549d4877c2e0748552cfcc26aaae0a46f3a.png)

May I know why is this part structured like this? I thought it should be in reverse:

“rowID”: “your row ID here”.

You are pointing a variable to a key instead of a value.

@Darren_Murphy I think the “Content Type” variable just above the request content covers it.

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 4:37am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/6 "2023-04-12T04:37:06Z")

</div>

We will try these things in a bit and we will get back. Thanks for your responses.

---

<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:** [April 12, 2023, 4:42am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/7 "2023-04-12T04:42:28Z")

</div>

> [@ThinhDinh](#):
>
> @Darren_Murphy I think the “Content Type” variable just above the request content covers it.

hmm, not 100% sure that it makes a difference, but I normally also include it explicitly in the request header. Here is what one of my calls typically looks like:

 ![CleanShot 2023-04-12 at 12.41.06@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/f/ff7239b12a784508967fe9d4ea44bb6c6437a03c.jpeg)

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 6:04am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/8 "2023-04-12T06:04:56Z")

</div>

Thanks for your help, @Darren_Murphy & @ThinhDinh!

Making these changes seems to have worked. Now, the status code is 200 as in the attached screenshot. However, the data has not been added to the Glide table.

 ![Screenshot 2023-04-12 at 11.31.09 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/b/1b99a028b7953a48b3b22a96db347e5620fb2e2e.png)

I made the following changes-

1. changed the order of the rowID
2. added content type to the header

not sure why data is not getting populated back in the Glide table.

Any thoughts?

---

<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:** [April 12, 2023, 6:35am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/9 "2023-04-12T06:35:26Z")

</div>

Are you sending the correct RowID value?

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 6:38am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/10 "2023-04-12T06:38:39Z")

</div>

Yes, I checked that in the ‘Request content’. The data being sent is correct. Does it likely have to do with the reverse order of the rowID? I had changed it based on @ThinhDinh’s comment. Should I reverse it? Will check that now.

---

<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:** [April 12, 2023, 6:43am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/11 "2023-04-12T06:43:46Z")

</div>

From your earlier screen shot:

![CleanShot 2023-04-12 at 14.41.06@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/a/cad97901ab2da2017d4a781032d3ada36df47b4f.png)

Putting aside the fact that in the screen shot you have the key and value back to front (which you said you fixed), have you confirmed that the value assigned to “merchant\_txn” corresponds to the correct RowID in the destination Glide Table?

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 11:22am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/12 "2023-04-12T11:22:58Z")

</div>

We tried multiple things, we even tried ‘Add Row’ API. **We’re getting 200 as status code but blank response from API.** The request content is correct, however, the response we receive is blank in glide tables.

 ![Screenshot 2023-04-12 at 4.50.29 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/697611e8d5df95a966e56a8484157d9d8eb0e786.png)

Data from the HTTP (5) response is not populating the glide table. Only row id is getting generated. The rest of the values are all blank.

We are on the Pro for Business Subscription. Does it have anything to do with this?

---

<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:** [April 12, 2023, 11:30am UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/13 "2023-04-12T11:30:21Z")

</div>

> [@Sanket\_Vyavahare](#):
>
> We are on the Pro for Business Subscription. Does it have anything to do with this?

I don’t know what a “Pro for Business” subscription is. There is Pro, and there is Business, so you either have one or the other. Regardless, you either have API access or you don’t, and obviously you do.

Can you show me a screen shot of the Glide Table that you are trying to add a row to, that includes the column headers?

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 12:00pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/14 "2023-04-12T12:00:27Z")

</div>

![Screenshot 2023-04-12 at 5.29.48 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef88dd330242c7e34853b06cd5a98328c81bc0ed.png)

here it is…

These are all the ids that are generated by the ‘Add-Row’ API request… However, the data getting passed is all blank

---

<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:** [April 12, 2023, 12:08pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/15 "2023-04-12T12:08:31Z")

</div>

Okay, so the rows are being added, but the column values are blank.  
That suggests to me that there could be a mis-match with the column names. Are you passing the correct column names, as per the example you get with “Show API Usage…” ?

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 12:21pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/16 "2023-04-12T12:21:28Z")

</div>

Yes, we are… we have simply copied and pasted the ‘Show API’ - ‘Add row’ cURL content to the request content while configuring HTTP module. Here is the sample request content that has gone through in the input of the HTTP module –

**HTTP Request Content**

 ![Screenshot 2023-04-12 at 5.48.52 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/2/c2b39df9156edcc08f12dde2c34c0b09386ab331.jpeg)  
H

Output

 ![Screenshot 2023-04-12 at 5.49.49 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/4/f4f23940c3a69dc1179759d17d221c077e0e6477.png)

Once again, row id is generated and not values in columns.

We are referring to this youtube video – [Glide API: Connect ANY platform to your Glide App! - YouTube](https://www.youtube.com/watch?v=bHidpKeQSAk&t=593s)

---

<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:** [April 12, 2023, 12:27pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/17 "2023-04-12T12:27:54Z")

</div>

It looks like you have all the keys and values mixed up, the same as you did with the RowID.

The value on the left hand side should be the column name that Show API Usage gives you, and the value on the right hand side should be the value that you want to set it to.

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 12:36pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/18 "2023-04-12T12:36:00Z")

</div>

We tried it the other way too. We are getting the same response.

For your info- this is how I see the ‘Show API’ page.

 ![Screenshot 2023-04-12 at 6.04.31 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/efa36a8ef198e87219782721686be42be230896c.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:** [April 12, 2023, 12:38pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/19 "2023-04-12T12:38:12Z")

</div>

Okay, so you should be using those column names as they are shown. eg, `bZZmy` for your Quotation ID, `hY2qr` for the Easebuzz ID, etc…

---

<div class="post-metadata">

**Author:** ![Sanket\_Vyavahare](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sanket_vyavahare/32/53264_2.png) [@Sanket\_Vyavahare](https://community.glideapps.com/u/Sanket_Vyavahare)\
**Post date:** [April 12, 2023, 1:01pm UTC](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412/20 "2023-04-12T13:01:50Z")

</div>

It worked. Thank you, @Darren_Murphy. Your help is invaluable to us. We are happy that you are quick to respond and always ready to help.

You’re a rockstar!

[Next page](https://community.glideapps.com/t/getting-unauthorized-error-when-pushing-data-to-edit-rows-api/60412.md?page=2)
