Webhooks basic authorization

Hi all,

Apologies if this has already been covered in the topics.
I’m trying to use a webhook action in a logicblock to call an external API (to send an SMS message).
It looks like adding an authorization parameter in the headers is not possible or am I mistaken?
I’m trying to add basic authorization into the header but I keep getting a 401 (unauthorized) response when I test the logicblock.

So for this I’ve taken the username and password required for the API and manually encoded them (base64 encoding) in the format username:password.
Then I’m adding the header key in Apilio as “Authorization: Basic” and the value as the encoded data.

Is there a workaround or special encoding that I can use to get the authentication to work?

Many thanks!

2 Likes

It depends on the API you are planning to use. It is not very common to send user/password via API.

In my case, I am using the API of Nuki to lock my smart lock:

2 Likes

Thanks Teknofilo.
I’ve managed to get it working!
I was missing the Content-Type header and your screenshot pointed me in the right direction.

In case your interested, I’m using the ClickSend service so I can get SMS notifications to my phone.
E.g. when the immersion is hot or when the washing machine is finished.

2 Likes

Have a look at Vybit. It is a free service, with app available for iOS and Android, that lets you send custom notifications via a very simple API.

I use it all the time to send notifications to my mobile when relevant things happen. You can even attach an image to the notification or a link that will be open when you click on the notification.

1 Like

Looks interesting.
I’m using the Pushover API (see pushover.net) through Apilio also via webhooks.
This is for less important notifications as these are free messages to send so I’m not charged (unlike the SMS messages).

2 Likes