Reset gear of activity not working?

48 views
Skip to first unread message

Matthias Simon

unread,
Oct 9, 2018, 12:30:55 PM10/9/18
to Strava API
I try to reset the gear of an existing activity. The documentation says, a PUT on /activities/{id} with { "gear_id": "none" } should reset the gear.

So what I do is this:

$ curl -v -X PUT -H 'Content-Type: application/json' -H 'Authorization: Bearer <my write access token>' https://www.strava.com/api/v3/activities/1886739262 -d '{ "gear_id": "none" }'


My access token has write permissions.

Expectation:
A representation of the activity is returned, the field 'gear' is null and when I view the activity under https://www.strava.com/activities/1886739262 no gear is shown.

Result:
A representation of the activity is returned, the field 'gear' has the old gear set and when I view the activity under https://www.strava.com/activities/1886739262 I see the old gear.


Any hints?

Thank you
Matthias

M. Yankov

unread,
Feb 4, 2022, 4:09:05 PM2/4/22
to Strava API
I have similar issue with clear the gear. I'm uploading a route (gpx) it sets default sport type (e.g. Run), then I update the activity with changing the type as per user's selection (e.g. Bike) and reset the gear in the same.
{ "gear_id" : "none", "type": "Ride", "hide_from_home": true }
After I open the activity in Strava it is selected with the default bike from the profile.

Later (after 30s) manually updating the activity with only { "gear_id" : "none" } - it works and clears the gear.

I feel there is something related with the changing activity type requires more time and webhooks could fix my problem, but it's complicated for me to use them for now.
Reply all
Reply to author
Forward
0 new messages