cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with upload gpx file API

tobisoft
Mt. Kenya

i have a  problem

i call this services to upload a file activity gpx

curl --location 'https://www.strava.com/api/v3/uploads' \
--header 'Authorization: Bearer ...' \
--form 'activity_type="Ride"' \
--form 'name="Test Walk"' \
--form 'description="Test walk for cyclon"' \
--form 'trainer="0"' \
--form 'commute="0"' \
--form 'data_type="gpx"' \
--form 'file=@"ftYnBaTC2/strava.gpx"'

 

the file sended is:

<?xml version="1.0" encoding="UTF-8"?>
<gpx
creator="CyclonApp"
version="1.1"
<metadata>
<time>2023-10-15T10:44:36Z</time>
</metadata>
<trk>
<name>Bicicleta por la tarde</name>
<trkseg>
<trkpt lat="44.6402470" lon="7.6585860">
<ele>318.1</ele>
<time>2023-10-15T10:44:36Z</time>
</trkpt>
<trkpt lat="44.6401380" lon="7.6586280">
<ele>318.1</ele>
<time>2023-10-15T10:44:37Z</time>
</trkpt>
<trkpt lat="44.6401430" lon="7.6586300">
<ele>318.1</ele>
<time>2023-10-15T10:44:38Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
 
 
then when i call the service to verify this file i found this.
curl --location 'https://www.strava.com/api/v3/uploads/1234' \
--header 'Authorization: Bearer ...'
 
response:
{
"id": 1234,
"id_str": "1234",
"external_id": null,
"error": "Improperly formatted data. <a href=\"https://support.strava.com/hc/articles/216917967-Uploading-poorly-formatted-GPS-files\" target=\"_blank\">More Information</a>.",
"status": "There was an error processing your activity.",
"activity_id": null
}
 
the file GPX is ok but i don't know why the services is fail.
help me!
thanks for all!
0 REPLIES 0