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.