Revised question with new information:
I'm attempting to upload an activity from my Android app. Having spent several days on working through the authorization process successfully, I am now stuck at the final hurdle. My POST for the upload returns a 400 error. The url is
https://www.strava.com/api/v3/uploads?activity_type="ride"&name="testing"&description="fromWandrerHelper"&data_type="gpx"&file=@/storage/emulated/0/Android/data/com.quilkin.wandrerhelper/files/Download/temp.gpxThe resulting error is: {"message":"Bad Request","errors":{"resource":"Upload","field":"file","code":"not a file"}]}
The GPX file itself has been tested separately, so it's the path that's not accepted. If I copy the file to my PC and use curl with the same url (with modified file path), the file uploads fine. But I can't use curl on the phone.
I've also tried using curl and postman on the PC with a file path to the file on the phone, but it appears that these apps can't use a path to a USB-connected phone.
So what's wrong with my file path? I've tried with and without quotation marks, (although the Strava developer examples suggest they aren't required).
The app has permission for reading the external files folder. It doesn't help, though, that android has several different ways of defining the path to files, especially since Android 8. I've tried all that I can find.