Open Closed

Simple Webhook Question #1544


User avatar
0
falsharif created

HI Team, first of all thanks for always being prompt on answering my questions.

This is a bit of a noob question but i would appreciate your help.

I am integrating with a delivery company to process my orders and ive created this appservice with an endpoint for the delivery company to call when they change status of my order :

public class SwftBoxAppService : DukkantekAppService, ISwftBoxAppService
{
    private readonly IRequestsManager _requestsManager;
    private readonly IRequestRepository _requestRepository;
    private readonly IDataFilter _dataFilter;

    public SwftBoxAppService(IRequestsManager requestsManager, IRequestRepository requestRepository,
        IDataFilter dataFilter)
    {
        _requestsManager = requestsManager;
        _requestRepository = requestRepository;
        _dataFilter = dataFilter;
    }

    [HttpPost]
    public async Task Update(SwftBoxWebhookInput input)
    {
        using (_dataFilter.Disable<IMultiTenant>())
        {
            var request =
                (await _requestRepository.GetQueryForNavigationPropertiesAsync()).SingleOrDefault(c =>
                    c.Request.RequestNumber == input.merchant_order_id);
            if (request == null)
            {
                throw new UserFriendlyException("Could not find this request");
            }

            await _requestsManager.UpdateSwftBoxWebhook(request, input);
        }
    }

My question is , how do i secure this enpoint for them to use.

shall i be creating a new client for them in identity clients ? How do i give them an API KEY or something to access that endpooint ??


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can take a look this: https://identityserver4.readthedocs.io/en/latest/quickstarts/1_client_credentials.html

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 17, 2025, 10:38