401 error, while testing webhook

Hey!

I have self-hosted NocoBD and testing webhooks. I want to send https request to site 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, 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!

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.

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.

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.

URL looks like
https://email:api_key@gate.smsaero.ru/v2/auth

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

Hi this seem to be caused by a limitation of axios which we use to call webhooks (reference).
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 instead.

Generate Authorization header (base64 representation of your username & password) (you can use this tool or a tool of your choice)

Add the header on your webhook:

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

This should resolve your issue.

1 Like