Strava API - pgalko/athlete_data_warehouse GitHub Wiki

Create and Setup Strava API application

You will need to register your Athlete_Data_Warehouse application with Strava, and get the Client ID and Client Secret to be able to authenticate via OAuth2 and download user data from Strava.

Once your application is registered with Strava, input the client ID, client secret, auth URL, token URL and redirect URI into work_dir/config/settings.ini before you run the application for the first time. The details will be encrypted upon application's first run and clear text settings.ini deleted.

[strava]
strava_client_id = 34681
strava_client_secret = 36hb6jc833dt58nczcf461509086b7935bfh68za
strava_auth_url = https://www.strava.com/oauth/authorize
strava_token_url = https://www.strava.com/oauth/token
strava_redirect_uri = http://127.0.0.1:5000/strava_confirm
  • Basic info about the API

The Strava REST API includes data on athletes, segments, routes, clubs, and gear. It is free to use. The Strava API does not allow you to get data for all Strava public athletes, as you can see on our website.

To get data on athletes, you will have to make an application and request that athletes sign in with Strava, and grant your application certain permissions using OAuth 2.0. You can get data on yourself without authentication for testing purposes.

Strava API usage is limited on a per-application basis using both a 15-minute and daily request limit. The default rate limit allows 100 requests every 15 minutes, with up to 1,000 requests per day.

  • How to Create an account

To start downloading data from Strava API via Athlete_Data_Warehouse utility, you will need to make an application

-If you have not already, go to https://www.strava.com/register and sign up for a Strava account.
-After you are logged in, go to https://www.strava.com/settings/api and create an app.
-You should see the “My API Application” page now.
-Here is what everything means:

Category: The category you chose for your application
Club: Will show if you have a club associated with your application
Client ID: Your application ID
Client Secret: Your client secret (please keep this confidential)
Authorization token: Your authorization token which will change every six hours (please keep this confidential)
Your Refresh token: The token you will use to get a new authorization token (please keep this confidential)
Rate limits: Your current rate limit
Authorization Callback Domain: When building your app, change “Authorization Callback Domain” to localhost or any domain. When taking your app live, change “Authorization Callback Domain” to a real domain.

image image