# Error Status Code 401 in weweb, but performing the delete action in Xano

**URL:** <https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232>\
**Category:** Ask us anything\
**Tags:** xano\
**Created:** [June 27, 2023, 4:34pm UTC](https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232 "2023-06-27T16:34:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FLP](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@FLP](https://community.weweb.io/u/FLP)\
**Post date:** [June 27, 2023, 4:34pm UTC](https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232/1 "2023-06-27T16:34:48Z")

</div>

I having troubles on a simple DELETE method using Xano native integration on weweb.  
Weweb show status code 401 on all request, but Xano performs the request OK and the item is Deleted from my database.  
this inconsistency scares me a little. I could not find a way to make it work, or make weweb understand that it have worked. I have logged in, logged out, update token… I tried to do it buy API REST, but the DELETE method is not a option, which is another point that i don’t understand.

Can anyone give me some light on how to make this simple thing (delete a record) work?

 ![erro 401](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bba4ff78cf333cf4df3c215863730aa2c4a2ec52.jpeg)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [June 28, 2023, 11:11am UTC](https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232/2 "2023-06-28T11:11:22Z")

</div>

Hi @FLP 👋

Let me try to help you with this.

Here’s a video showing [two ways of deleting a record in Xano](https://tella.video/delete-record-in-xano-8oqn):

1. with the REST API plugin
2. with the Xano plugin

> [@FLP](#):
>
> Weweb show status code 401 on all request, but Xano performs the request OK and the item is Deleted from my database.  
> this inconsistency scares me a little. I could not find a way to make it work, or make weweb understand that it have worked. I have logged in, logged out, update token…

If the video above doesn’t help you identify the issue, can you create a few fake records in Xano and try deleting them while recording your screen so we can better understand what’s going on?

It’d be super helpful if we could see how the Xano endpoint is setup and the roles and permissions of the user who is authenticated in WeWeb when making the delete call.

> [@FLP](#):
>
> I tried to do it buy API REST, but the DELETE method is not a option, which is another point that i don’t understand.

Yes, it is but you’ll need to trigger the request in a Workflow:

 ![CleanShot 2023-06-28 at 12.44.17@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/ec11dae3690331355426e18f022a4273406abc1d.jpeg)

The reason for this is that Collections are to interact with data you might want to paginate or filter but it’s a great UX point, I’ll pass it on to the product team!

That said, you shouldn’t need the REST API plugin. You should be able to delete a Xano record with the Xano integration like I showed in the second part of the video.

---

<div class="post-metadata">

**Author:** ![FLP](https://avatars.discourse-cdn.com/v4/letter/f/b9bd4f/32.png) [@FLP](https://community.weweb.io/u/FLP)\
**Post date:** [June 29, 2023, 12:21pm UTC](https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232/3 "2023-06-29T12:21:25Z")

</div>

Thaks a lot for your time. I was trying to create a collection with a DELETE funcion and it is not working. when doing on workflow, i works perfect, and I agree it’s a much better aproach.

I getting used to weweb. I am liking it a lot

Thanks again for your attention.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [June 29, 2023, 10:56pm UTC](https://community.weweb.io/t/error-status-code-401-in-weweb-but-performing-the-delete-action-in-xano/3232/4 "2023-06-29T22:56:50Z")

</div>

Awesome! Glad you’re enjoying it 🙂

And you’re welcome 🙂 More than happy to help!
