cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to change gear for an activity via API

notacreature
Mt. Kenya

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 1

corbmanj
Mt. Kenya

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.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings