Skip to main content
Solved

Webhook event data schema

  • September 10, 2024
  • 1 reply
  • 41 views

I'm looking into implementing webhooks into my application, however, I cannot find a complete event schema anywhere.

https://developers.strava.com/docs/webhooks/

The above website contains only one example, with update of activity title. I what to know what data I'll receive when activity is created. Will I also get a webhook call of type "create an athlete" when someone signs up for my application? Or I just couldn't find the docs I was searching for?

Cheers,

Best answer by ActivityFix

While only one example is given, the event data section has a table showing the various webhooks you will receive.

Create athlete - There is no webhook for that. Since the athlete has to go through the OAuth process to authorize your app, you can use that to determine when someone signs up. You do get a webhook when an athlete revokes authorization for your app (object type = athlete, updates = { "authorized" : "false" })

Activity webhooks - You'll get ones for create, update, and delete. The data in the updates field will vary depending on which call is made. Create will not have any, update will be one or more of title, type, and private, depending on what changed.

To answer your specific question, a create activity webhook will look something like below, where object_id is the new activity ID, owner_id is the ID of the athlete creating the activity, and subscription_id is your webhook subscription ID.

 

 

{ "aspect_type": "create", "event_time": 1725991232, "object_id": 12345, "object_type": "activity", "owner_id": 67890, "subscription_id": 98765, "updates": { } }

 

 

 

View original
Did this topic help you find an answer to your question?

1 reply

ActivityFix
Superuser
Forum|alt.badge.img+24
  • Superuser
  • 232 replies
  • Answer
  • September 10, 2024

While only one example is given, the event data section has a table showing the various webhooks you will receive.

Create athlete - There is no webhook for that. Since the athlete has to go through the OAuth process to authorize your app, you can use that to determine when someone signs up. You do get a webhook when an athlete revokes authorization for your app (object type = athlete, updates = { "authorized" : "false" })

Activity webhooks - You'll get ones for create, update, and delete. The data in the updates field will vary depending on which call is made. Create will not have any, update will be one or more of title, type, and private, depending on what changed.

To answer your specific question, a create activity webhook will look something like below, where object_id is the new activity ID, owner_id is the ID of the athlete creating the activity, and subscription_id is your webhook subscription ID.

 

 

{ "aspect_type": "create", "event_time": 1725991232, "object_id": 12345, "object_type": "activity", "owner_id": 67890, "subscription_id": 98765, "updates": { } }

 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings