Skip to main content
Question

Unable to change gear for an activity via API

  • October 11, 2023
  • 1 reply
  • 41 views

notacreature
Forum|alt.badge.img+1

Hi! I have a problem with my Telegram bot which uploads activity files to your Strava accounts.
I've made it so you first publish the activity through the bot, and then you can change it's name/description/type etc.
And here lies the problem: when the bot changes the type of an activity through the API, the default gear doesn't set automatically, so you have to log in the Strava app and change it manually.

  1. Is there a way to set shoes/bikes for the activity via the API?
  2. Also, I remember previously gear items had "primary" parameter, which, i think, corresponded with the Default equipment in the UI. But now, since developers added the default sports list to the gear, the "primaryparameter is always set to "false" and cannot be changed, hence the gear can't be set automatically when editing activity via API. Am I right or missing something?

1 reply

Forum|alt.badge.img+1
  • Hub Starter
  • 1 reply
  • November 8, 2023

Based on the API documentation it looks like you can call UpdateActivity with an instance of an UpdatableActivity which includes a `gear_id`.

Also, summary_gear which comes back from GET authenticated athlete looks it should include a boolean called `primary` indicating if it's the default gear. But you're right, I don't see a way to change the primary flag.


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