To which accounts do you want to share? Usually a server side sharing isn't feasible because the Strava server doesn't know the logins for the other accounts.
Hi,
The goal would be to be able to share to any account using only the athlete id, the same way it is done when you want to share an activity in the official Strava app.
Otherwise the only way I could achieve it currently would be to authorize all the accounts that I wish to share to as well, and then download and re-upload de gpx/tcx file. This is not really optimal and allowing us to call an activity sharing endpoint would be great in my opinion.
The Strava app uses OS functions on the smartphone for sharing therefore you have to do the same. Doing that with the Strava API would be technically impossible.
I might not have express myself very clearly, but I'm actually refering to the feature to add someone to an activity, which they can then accept or decline later. If they accept, a clone of the activity is created in theirs. That's entirely managed by Strava and have nothing to do with the OS functions.
I don't know if you can change the thread title and description as sharing and "Add friends" are completely different things. This would improve the possibility that someone from Strava has an answer for you.