elsa-workflows / elsa-workflows/elsa-core
Elsa 3 - Webhooks - how to add auth details for external API
- 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
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