Most accurate way to migrate from NRC to Strava (includes elevation & heart rate data)
- Install Node
- npm install
- Specify env variables
- npm start nike - fetch all Nike Run Club activities that have GPS data and create gpx files
- npm start strava - upload all gpx files to Strava
- npm run sync - same as above in one command
or use docker
docker run --env-file=/opt/nrc2strava/.env rtyshyk/nrc2strava
- Gpx file for activity without GPS data will not be created
- You need to specify env variables to fetch and upload
- You can get NIKE refresh token by login to your account - website, and look to your browser local storage
unite.nike.com
domain andcom.nike.commerce.nikedotcom.web.credential
key, with next json keysrefresh_token
,unite_session.clientId
. Do not use logout feature on website, as it will invalidate your token. - You can get Stava env variables by creating Strava App. Visit
https://www.strava.com/settings/api
to create the app (its free). You can set any valid domain name.- Login into your app, open URL (replace UPPERCASE values first)
https://www.strava.com/oauth/authorize?client_id=CLIENT_ID&response_type=code&redirect_uri=https://YOUR_DOMAIN_FOR_APP&approval_prompt=force&scope=activity:write
- You will be redirected to your app webpage (redirect url) with the
code
query parameter, copy it. - Send one more request to obtain refresh token
curl -X POST https://www.strava.com/api/v3/oauth/token -d client_id=CLIENT_ID -d client_secret=CLIENT_SECRET -d code=CODE_STEP_2 -d grant_type=authorization_code
- Set
STRAVA_REFRESH_TOKEN
from the previous request
- Login into your app, open URL (replace UPPERCASE values first)
- Duplicated activities will not be loaded
- It is just a fast working solution