Overview
Strava webhooks notify Open Wearables when activities are created, updated, or deleted. The webhook uses a single endpoint with two methods:- GET: Subscription verification during webhook setup
- POST: Activity event notifications
These endpoints are designed to be called by Strava’s servers, not by your application. Configure the webhook subscription via the Strava API Settings.
Webhook Verification (GET)
Endpoint
GET /api/v1/webhooks/strava/webhook
Description
When creating a webhook subscription, Strava sends a GET request to verify your endpoint. You must echo back thehub.challenge parameter if the hub.verify_token matches your configured token.
Query Parameters
Always “subscribe” during verification
Random string to echo back for verification
Your verification token (configured in Strava API settings)
Response
The challenge string echoed back to Strava
Example Request
Strava Verification Request
Example Response
200 - Success
403 - Forbidden
Event Notification (POST)
Endpoint
POST /api/v1/webhooks/strava/webhook
Description
Receives notifications when activities are created, updated, or deleted. The webhook contains minimal information (activity ID, owner ID, event type) - full activity data must be fetched separately using the Strava API.Request Body
Strava sends a JSON payload with event details.Example Event Payload
Request Fields
Type of object - currently always “activity” or “athlete”
Strava activity ID
Event type:
create: New activity createdupdate: Activity updateddelete: Activity deleted
Strava athlete (user) ID who owns the activity
Your webhook subscription ID
Unix timestamp when the event occurred
Response
Always returns HTTP 200 to acknowledge receipt. Strava will retry if non-200 status is returned.Status of event processing
Human-readable message
Example Responses
200 - Activity Created
200 - Activity Updated
200 - Activity Deleted
200 - User Not Found
Event Types
Activity Created
Triggered when a user uploads or records a new activity. Open Wearables will:- Verify the user has an active Strava connection
- Fetch full activity details from Strava API
- Save activity as EventRecord in the database
Activity Updated
Triggered when a user edits an activity (title, description, privacy, etc.). Open Wearables will:- Fetch updated activity details from Strava API
- Update the corresponding EventRecord
Activity Deleted
Triggered when a user deletes an activity. Open Wearables will:- Find the corresponding EventRecord
- Mark it as deleted or remove it (depending on configuration)
Athlete Updates
Triggered when athlete profile is updated (deauthorization, privacy changes). Open Wearables will:- Update connection status if deauthorized
- Update privacy settings if changed
Health Check
Endpoint
GET /api/v1/webhooks/strava/health
Description
Health check endpoint for monitoring webhook availability.Response
200 - OK
Setup Guide
1. Create Webhook Subscription
Use the Strava API to create a subscription:Create Subscription
2. Verify Subscription
Strava will immediately call your GET endpoint to verify the subscription. Ensure your server:- Accepts the
hub.mode,hub.challenge, andhub.verify_tokenparameters - Validates the verify token matches your configured value
- Returns the
hub.challengein the response
3. Handle Events
Once verified, Strava will POST events to your webhook URL. Your server must:- Always return HTTP 200 (even for errors)
- Process events asynchronously
- Handle rate limits when fetching activity details
4. Test the Webhook
Create a test activity in your Strava account and verify:- Webhook receives POST request
- Activity is fetched and saved correctly
- No errors are logged
Rate Limits
When fetching activity details via Strava API:- 100 requests per 15 minutes
- 1000 requests per day
- Queuing webhook events
- Implementing exponential backoff
- Respecting Strava’s rate limit headers
Error Handling
- Always returns HTTP 200 to prevent Strava from retrying
- Errors are logged internally and tracked via monitoring
- User not found errors are normal (user may have disconnected)
- Activity fetch failures are retried with exponential backoff
- Duplicate events are deduplicated automatically
Security
- Webhook endpoint is public (no API key required)
- Verify token prevents unauthorized subscription creation
- Activity data is fetched using user’s OAuth access token
- Validate event authenticity by checking subscription_id
Troubleshooting
Webhook Not Receiving Events
- Verify subscription is active:
GET https://www.strava.com/api/v3/push_subscriptions - Check callback URL is publicly accessible
- Ensure webhook returns HTTP 200
- Review Strava API logs in developer dashboard
Duplicate Events
Strava may send duplicate events if:- Webhook response is slow (> 2 seconds)
- Non-200 status code returned
- Network timeout occurs
Missing Activities
If activities aren’t appearing:- Check user’s Strava connection is active
- Verify OAuth token hasn’t expired
- Check activity privacy settings (private activities may be excluded)
- Review error logs for API rate limiting
Related Endpoints
- Sync Data - Manually trigger Strava sync
- List Connections - View user’s Strava connection status
