Get a client ID and secret from Strava Settings, My API Application and set these as environment variables. You can also create a .env file in the current directory with these settings and the strava-webhooks tool will pick that up, export or specify these on the command line. YMMV.
Show Existing Subscriptions
Try strava-webhooks without any arguments. It should show you existing subscriptions, aka none.
Run a local webhook handler that responds to Strava pushing events with strava-webhooks handle.
Note that it starts on port 4242 by default.
Since your local machine is not addressable from the Internet, use ngrok, in another terminal.
This creates an HTTPs forwarding URL, eg. https://d3d0c6c4.ngrok.io.
Create a webhook subscription with strava-webhooks create [url].
The response contains a subscription ID of 136021.
Notice that the handler had to respond to a hub challenge.
Start by creating a manual activity for the same user. This will trigger an event that you can see in the handler window.
Delete the activity.
Authorized User Activities
To see other users’ events these must authorize your application. See Strava Authentication for implementation details.
Delete the Subscription
Delete the subscription with strava-webhooks delete [id].
The complete source code for strava-webhooks is here.