- Authentication flow: https://developers.strava.com/docs/authentication/
- Webhooks: https://developers.strava.com/docs/webhooks/
- Webhook design: https://birdie0.github.io/discord-webhooks-guide/
npm install
Create a secrets file for your specific stage: .env.<stage>
Include the following variables.
CLIENT_ID=<value>
CLIENT_SECRET=<value>
SUBSCRIPTION_ID=<value>
DISCORD_WEBHOOK_URL=<value>
LAYER_ARN=<value>
MAPBOX_ACCESS_TOKEN=<value>
serverless deploy --stage <stage>
Steps to set up a Strava subscription are defined here (You must get approval before your application will receive events).
curl -X POST https://api.strava.com/api/v3/push_subscriptions \
-F client_id=<client-id> \
-F client_secret=<client-secret> \
-F 'callback_url=https://<your-callback-url>' \
-F 'verify_token=STRAVA'
To deploy a single function:
serverless deploy function --stage <stage> --function <function-name>