Parse query parameters

Hi,

I want to register a webhook subscription in another system (in this case, Business Central) so it will notify me (Alumio) when things change over there.

I can do that (using Postman for example) by POSTing to {businesscentral_url}/subscriptions providing a body with the Alumio url it must use to do the notifications:

POST {businesscentral_url}/subscriptions
{
  "notificationUrl": "https://{my_alumio_environment}.alumio.com/api/v1/webhook/businesscentral",
   ...
}

I only have to do that once to register the webhook subscription.

Now, BusinessCentral first verifies the notification URL by POSTing a request to it with a validationToken in the query:

POST https://{my_alumio_environment}.alumio.com/api/v1/webhook/businesscentral?validationToken=XXXX

BusinessCentral expects the response to have a body with that validationToken:

{
   "validationToken": "XXXX"
}

So I created a webhook in Alumio to handle the validation request (and the following notifications).

But how do I implement the Alumio webhook to test if there is a query parameter
validationToken=XXXX and if so, to put it in the response body and stop further processing?

If the query parameter is not present, it must be a notification request and I let the Incoming Configuration handle it.

Thanks.

1 Like

Hi @ben,

Regarding your questions, I will ask the team first and get back to you when I have an answer.

Hi @ben,

Thank you for your patience. Our team has replied, that this is not possible at the moment for a webhook to response with a dynamic message.

If the validation code is known in advanced you can configure a custom response body under the “Response” tab. But it is currently not possible to make this dynamic based on (GET) parameters.

I hope it’s clear for you, but please let me know if there is anything I can help with.

Hi Rian / team,

Thanks for the clear answer. I will find another way :+1:

Regards,
Ben

Hi @r.candrian ,

I’ve also got the same issue for Business Central. This will block a future integration.

It would be great if Webhooks allow us to send back dynamic responses. I understand it wouldn’t be as advanced as HTTP Proxies, but it could be a dynamic response based purely on the data the Webhook gets in.

Hi @floris,

Thank you for your inquiry about enabling dynamic responses for our webhook feature.

We recognize the importance of this feature for your needs and assure you that we’re actively exploring solutions. Your understanding during this process is appreciated.