I am well able to download my GPX file of an activity when logged in to Strava and calling this link: https://www.strava.com/activities/5656012590/export_original I get the original gpx. It looks as I need it.
Is there a v3 api way? I would like to access it with the swagger generated code, a la
new ActivitiesApi(getApiClientWithToken(token)).getLoggedInAthleteActivities(System.currentTimeSeconds().toInteger(), 0, 1, 30)
(Groovy code, this works for getting activities)
The only thing I found is https://www.strava.com/api/v3/routes/{id}/export_gpx. But from what I see in the Api response of activities, there is no route attached to it. In activities I can see an 'externalId' which is set to something like '123456123.gpx' and I can see the polylines from the map. But converting polylines sounds like too much effort now and I guess it misses some points. Accessing the externalID, I have no idea.
In the end I don't really care how to get the GPX. If it is a cURL call with passing the token via post and then downloading it, would be fine, as well as getting it with the Java API from swagger. I would prefer the latter option though.