Skip to main content

Hi Strava API Team,

I’m currently integrating Strava into my application using the OAuth flow, and I’m successfully retrieving data for users who authenticate via Strava Login.

Now I would like to use webhooks to get real-time updates (especially activities) from multiple users who have authenticated via my app. However, I have some questions regarding how this works:

  1. Is it possible to register a single webhook callback URL and receive activity updates for all authenticated users?

  2. Or do I need to register a separate webhook subscription for each user?

  3. If only one webhook subscription is allowed per app (as mentioned in the docs), how can I identify which user triggered the webhook event?

  4. Do I need to store each user's athlete_id upon login to match webhook payloads with users in my database?

Any clarification or best practices on how to handle webhooks for multiple users in a single application would be greatly appreciated.

Thank you!

Webhooks are documented here - https://developers.strava.com/docs/webhooks/

You can only have a single webhook subscription. If you look at the data included, one of the fields is “owner_id” which is the ID of the athlete whose data you are receiving.

Also note the webhook data doesn't actually contain any activity data, just an object_id. So in addition to storing athlete_id, you will need to store authentication tokens (token + refresh token) so you can make API calls to get a valid token and retrieve the activity data.

One security note which you'll see commented on a lot here - there's nothing to prevent someone from sending fake webhooks to your server if they know your webhook endpoint and application ID. Search the community hub to see discussions of how people deal with that potential issue.