How to activate a webhook. How to handle a challenge string?

How to activate a webhook. How to handle a challenge string?

When enabling wehooks the dashboard returns the response

Error Creating Webhook. The user aborted a request.

You need to active the endpoint by parsing the challenge parameter and returning it in the response body.