# 401 error, while testing webhook

**URL:** <https://community.nocodb.com/t/401-error-while-testing-webhook/1690>\
**Category:** Webhooks\
**Created:** [March 4, 2025, 10:52am UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690 "2025-03-04T10:52:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![omniamoderata](https://avatars.discourse-cdn.com/v4/letter/o/e8c25b/32.png) [@omniamoderata](https://community.nocodb.com/u/omniamoderata)\
**Post date:** [March 4, 2025, 10:52am UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/1 "2025-03-04T10:52:35Z")

</div>

Hey!

I have self-hosted NocoBD and testing webhooks. I want to send https request to site [https://smsaero.ru/](https://smsaero.ru/).  
For request I need only https link. All credentials are included in url. I tested authorization link by Chrome and [Make.com](http://Make.com), it has been successfully worked.

But when I tried the same link in NocoDB, test of webhook received 401 server error. How can I manage it?

Thanks!

---

<div class="post-metadata">

**Author:** ![mertmit](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mertmit](https://community.nocodb.com/u/mertmit)\
**Post date:** [March 5, 2025, 6:36am UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/2 "2025-03-05T06:36:12Z")

</div>

Hi @omniamoderata  
Confirm if you are using correct request type (we use POST by default but it sounds like you need a GET - just a guess)  
Also check if you need any headers from their docs & make sure to pass them.

---

<div class="post-metadata">

**Author:** ![omniamoderata](https://avatars.discourse-cdn.com/v4/letter/o/e8c25b/32.png) [@omniamoderata](https://community.nocodb.com/u/omniamoderata)\
**Post date:** [March 5, 2025, 4:40pm UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/3 "2025-03-05T16:40:14Z")

</div>

Hi @mertmit,

Unfortunately, it is acceptable to use both methods (post or get).

But I tried and It did not work.

No headers are needed, because vendor uses HTTP Basic Auth, so all credentials are included in url.

---

<div class="post-metadata">

**Author:** ![mertmit](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mertmit](https://community.nocodb.com/u/mertmit)\
**Post date:** [March 5, 2025, 9:50pm UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/4 "2025-03-05T21:50:42Z")

</div>

I’ve confirmed we are properly passing basic auth headers using a local scenario.

Does your url have something outstanding like special characters etc.

Also if you are using handlebar syntax please try without it to see if it works.

---

<div class="post-metadata">

**Author:** ![omniamoderata](https://avatars.discourse-cdn.com/v4/letter/o/e8c25b/32.png) [@omniamoderata](https://community.nocodb.com/u/omniamoderata)\
**Post date:** [March 6, 2025, 10:41am UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/5 "2025-03-06T10:41:15Z")

</div>

URL looks like  
[https://email:api\_key@gate.smsaero.ru/v2/auth](https://email:api_key@gate.smsaero.ru/v2/auth)

about handlebar syntax, Im not sure, because I firstly read about it in your message 🙂. but I have not enterprise version of NocoDB and fill only fields below (other remains by default):

 ![image](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/3d245dca809a60f2dc16f1781888ea0e94c57933.png)

---

<div class="post-metadata">

**Author:** ![mertmit](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mertmit](https://community.nocodb.com/u/mertmit)\
**Post date:** [March 6, 2025, 11:28am UTC](https://community.nocodb.com/t/401-error-while-testing-webhook/1690/6 "2025-03-06T11:28:35Z")

</div>

Hi this seem to be caused by a limitation of axios which we use to call webhooks ([reference](https://github.com/axios/axios/issues/5158)).  
When there is a @ in username it breaks the authentication token generated.  
I will see what we can do but as this might take some time.

Simple way to workaround this using [Authorization header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#basic_authentication) instead.

Generate Authorization header (base64 representation of your username & password) (you can use [this tool](https://www.debugbear.com/basic-auth-header-generator) or a tool of your choice)

Add the header on your webhook:

 ![image](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/b6a9640ca14fd6594704884d057af530af409d0c.png)

Make sure to use URL without credentials (`https://gate.smsaero.ru/v2/auth` on your case).

This should resolve your issue.
