script to upload (fit) files to strava
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


script to upload (fit) files to strava


Install strava-v3 and stdio modules

$ npm install strava-v3
$ npm install stdio

USAGE: node strava-file-upload.js [OPTION1] [OPTION2]... arg1 arg2...

The following options are supported:
-f, --file input fit filename (mandatory)


$ NODE_PATH=/usr/local/lib/node_modules/ node strava-file-upload.js -f

note: NODE_PATH might not be required on your system.

Strava API access

Follow the instruction from here:

In case of an 'Authorization Error' (no write permission) follow these steps:
The url returned from getRequestAccessURL() is bascically the link you can find on the strava page under the 'Update Application' section named 'OAuth Authorization page' but make sure the scope is set appropriately ('view_private,write'). Put the token returned by strava.oauth.getToken() into the code:{
    access_token: 'WRITE_ACCESS_TOKEN HERE',
    data_type:    'fit',
    file:         args.file,