elsa-workflows / elsa-workflows/elsa-core

Elsa 3 - Webhooks - how to add auth details for external API

Open
#4,846 1 comment 0 reactions 0 assignees View on GitHub
elsa 3 enhancement triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

I'm using Elsa v3. I have followed the example from here - https://v3.elsaworkflows.io/docs/guides/external-app-integration#example , its working as expected. However, in the example, no authentication details were specified for calling the external API. How to send API key or a JWT token while calling the external API? Can I configure that in the ElsaServer program.cs file itself while configuring Webhook?

```
elsa.UseWebhooks(webhooks => webhooks.WebhookOptions =
options =>
{
//options.Endpoints.Add(new Elsa.Webhooks.Models.WebhookRegistration(new Uri("https://localhost:62905/api/webhooks/run-task")));
builder.Configuration.GetSection("Webhooks").Bind(options);
});
```
My external API is configured to Authenticated using Azure AD b2c. Is there a way to configure Webhook to get token before calling the external API?

Contributor guide

Open the contributing guide

Research direction

Start with the Webhooks configuration in ElsaServer Program.cs and the external-app integration example linked in the issue. Determine whether webhook calls support API keys or JWT tokens, including Azure AD B2C token acquisition, and document or define the configuration needed for authenticated external API requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.