Skip to main content

I notice if I add an ampersand (&) or sometimes less than/greater than signs (< and >) to the name of my activity when uploading a gpx file via the API, I will get back the error below, even though the same exact gpx file uploads fine with another activity name. I’ve tried escaping and encoding, but can’t make it work.

{
  ...
  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
}

Turns out it had nothing to do with strava. I was inserting the title into the metadata of the gpx file and it was breaking the file.