If you check their wonderful webhooks documentation, it describes how to create a subscription via a simple curl command.

curl -X POST https://api.strava.com/api/v3/push_subscriptions \

-F client_id=CLIENT_ID \

-F client_secret=CLIENT_SECRET \

-F 'callback_url=CALLBACK_URL' \

-F 'verify_token=STRAVA'

We know what the CLIENT_ID and CLIENT_SECRET are since we created them already. The verify_token is simply a way of authenticating that the initial handshake of the subscription actually came from Strava. Read the documentation on more about that. But what about the CALLBACK_URL. This is essentially where Strava will POST events to when new ones are created. It would likely be something like http://my-website.com/strava/event.

But what if we’re developing locally. Your server is going to be hosted on localhost inaccessible to the outside world.

Enter ngrok.

Ngrok is a really neat tool that allows you to expose a localhost port to a publicly accessibly URL. This is super useful if you need to demo something for a product manager real quick.

Sign up for an account and visit the dashboard to get your authtoken.

Ngrok

I personally like to install ngrok with Homebrew Cask.