Checkmate icon indicating copy to clipboard operation
Checkmate copied to clipboard

Add bearer/basic auth option to webhooks

Open gorkem-bwl opened this issue 6 months ago • 11 comments

Notifications > Webhooks section needs optional bearer/basic auth

What you need to do is to add two optional fields below Webhook URL:

  • Authentication Type (dropdown):
    • None (default)
    • Basic Auth
    • Bearer Token

If Basic Auth is selected, ask for:

  • Username
  • Password

If Bearer Token is selected, ask for:

  • Token input field

That is it. Additionally when sending the webhook request, do the following:

  • For basic Auth:

    • Encode username:password in base64.
    • Add header: Authorization: Basic base64(username:password)
  • For bearer token, it's more simple.

    • Add header: Authorization: Bearer YOUR_TOKEN

gorkem-bwl avatar May 29 '25 23:05 gorkem-bwl

I can start working on this @gorkem-bwl

vishnusn77 avatar May 31 '25 16:05 vishnusn77

Sure, please go ahead 👍

gorkem-bwl avatar May 31 '25 17:05 gorkem-bwl

Since notifications have its own sidebar entry, this must be handled there.

gorkem-bwl avatar Jun 18 '25 04:06 gorkem-bwl

There seems to be a lack of update on this. I'd be happy to contribute. @gorkem-bwl could you please elaborate a bit on what you consider "bearer/basic" auth?

rkhatta1 avatar Jun 23 '25 20:06 rkhatta1

There seems to be a lack of update on this. I'd be happy to contribute. @gorkem-bwl could you please elaborate a bit on what you consider "bearer/basic" auth?

Sure, I have updated the main issue now.

gorkem-bwl avatar Jun 23 '25 21:06 gorkem-bwl

Is this issue still open, can I work on it??

vinay-d07 avatar Jul 08 '25 09:07 vinay-d07

Is this issue still open, can I work on it??

Hi Vinay. There is an open PR for this.

gorkem-bwl avatar Jul 08 '25 09:07 gorkem-bwl

Even better would be to give user control over the headers of the webhook. Hey, maybe even give them control over the body!

Uptime Kuma did this perfectly (example of notifying via WhatsApp API):

Image

dvdl16 avatar Aug 21 '25 19:08 dvdl16

@dvdl16 those are pretty good options. Once this issue is picked up and complete, we can do add custom body and additional options sections there so other platforms like Whatsapp can be covered.

gorkem-bwl avatar Aug 21 '25 19:08 gorkem-bwl

Thanks @gorkem-bwl Fantastic project, looking forward to following along

dvdl16 avatar Aug 21 '25 19:08 dvdl16

Thanks @gorkem-bwl Fantastic project, looking forward to following along

Very well, thank you for your kind words Dirk.

gorkem-bwl avatar Aug 21 '25 20:08 gorkem-bwl