- Python 3.7+
- aiohttp
pip install -r requirements.txt
- Strava api token with activity:write scope
- create application: https://developers.strava.com/docs/getting-started/
- create token with activity:write scope. Run in your browser with open network console
Click authorize. Browser will do some requests. Find one that look like thishttps://www.strava.com/oauth/authorize? client_id=<client_id>& redirect_uri=http://localhost& response_type=code& scope=activity:write
and get the code. Then runhttp://localhost/?state=&code=<code>&scope=read,activity:write
in response you should get access token you can use in this scriptcurl -X POST https://www.strava.com/api/v3/oauth/token \ -d client_id=<client_id> \ -d client_secret=<client_secret> \ -d code=<code you got> \ -d grant_type=authorization_code
python main.py <endomondo email> <endomondo password> <strava access token>
By default Strava API allows for 100 requests per 15 minutes.
When the script reaches the limit it waits 15 min to be able to perform more requests. Due to that execution can be long. There is also a daily limit 1000 requests that resets at midnight UTC.
If you have more than 1000 workouts you can run the script over midnight or customize this script.
Read more https://developers.strava.com/docs/rate-limits/
You don't have to be worried about workout duplications caused by running this script many times because Strava refuses to add the same workout many times.