Skip to main content

Strava

This page guides you through the process of setting up the Strava source connector.

Prerequisites​

  • A Strava account for the athlete whose data you want to sync.
  • The athlete's numeric Athlete ID. See Find your Athlete ID.
  • The activity:read_all scope, granted by the athlete during authorization. Strava lets the athlete uncheck requested scopes on the authorization page, and refreshing a token doesn't add missing scopes.
  • Airbyte Open Source only: A Strava API application, which provides the Client ID and Client Secret, and a refresh token for the athlete. Strava requires a subscription to create an API application. New applications start in single-player mode, which means only the account that owns the application can authorize it.

Setup guide​

Step 1: Set up Strava​

Find your Athlete ID​

  1. Sign in to Strava and open your athlete page. Click your name on the Strava dashboard, or hover over your profile icon in the top bar and click My Profile.
  2. Copy the number at the end of the URL. For example, the Athlete ID for https://www.strava.com/athletes/17831421 is 17831421.

The Athlete ID must belong to the same athlete who authorizes the connection. Strava's athlete stats endpoint only returns stats for the authenticated athlete.

Get API credentials (Airbyte Open Source)​

  1. Follow Strava's Getting Started guide to create an API application at strava.com/settings/api. Set Authorization Callback Domain to localhost.

  2. Copy the Client ID and Client Secret from the My API Application page.

  3. Enter the following URL in your browser, replacing [REPLACE_WITH_YOUR_CLIENT_ID] with your Client ID:

    https://www.strava.com/oauth/authorize?client_id=[REPLACE_WITH_YOUR_CLIENT_ID]&response_type=code&redirect_uri=https://localhost/exchange_token&approval_prompt=force&scope=activity:read_all
  4. Sign in if prompted, keep the requested permission checked, and click Authorize.

  5. Your browser redirects to a page that doesn't load, with a URL similar to https://localhost/exchange_token?state=&code=b55003496d87a9f0b694ca1680cd5690d27d9d28&scope=activity:read_all. Confirm that the scope parameter includes activity:read_all, then copy the value of the code parameter. In this example, the code is b55003496d87a9f0b694ca1680cd5690d27d9d28. The code is short-lived and works only once.

  6. Exchange the authorization code for a refresh token:

    curl -X POST https://www.strava.com/oauth/token \
    -F client_id=YOUR_CLIENT_ID \
    -F client_secret=YOUR_CLIENT_SECRET \
    -F code=AUTHORIZATION_CODE \
    -F grant_type=authorization_code
  7. Copy the refresh_token value from the JSON response. The response looks similar to this:

    {
    "token_type": "Bearer",
    "expires_at": 1562908002,
    "expires_in": 21600,
    "refresh_token": "REFRESHTOKEN",
    "access_token": "ACCESSTOKEN",
    "athlete": {
    "id": 123456,
    "username": "MeowTheCat",
    ...
    }
    }

For more information, see Strava's Authentication documentation.

Step 2: Set up the source connector in Airbyte​

For Airbyte Cloud:

  1. Log in to your Airbyte Cloud account.
  2. In the left navigation bar, click Sources. In the top-right corner, click + New source.
  3. On the source setup page, select Strava from the source type list and enter a name for this connector.
  4. Click Authenticate your account.
  5. Sign in to Strava and authorize access. Keep the requested activity permission checked.
  6. Enter the Athlete ID and Start Date.
  7. Click Set up source.

For Airbyte Open Source:

  1. Open your local Airbyte instance.
  2. In the left navigation bar, click Sources. In the top-right corner, click + New source.
  3. On the source setup page, select Strava from the source type list and enter a name for this connector.
  4. Enter your Client ID, Client Secret, and Refresh Token.
  5. Enter the Athlete ID and Start Date.
  6. Click Set up source.

Start Date is a UTC date and time in the format YYYY-MM-DDTHH:MM:SSZ. The connector only syncs activities that start after this date. It doesn't filter the Athlete Stats stream.

The connection check reads both athlete stats and activities, so setup fails if the token is missing the activity:read_all scope.

Supported sync modes​

The Strava source connector supports the following sync modes:

Supported streams​

StreamEndpointIncrementalNotes
Athlete StatsGet Athlete StatsNoReturns one record of cumulative ride, run, and swim totals. Strava only includes activities with Everyone visibility in these totals.
ActivitiesList Athlete ActivitiesYesUses start_date as the cursor and id as the primary key. Includes activities with Only You visibility because the connector requires activity:read_all.

Authentication and token refresh​

Strava access tokens expire after six hours. Airbyte refreshes them automatically and saves the latest refresh token in the source configuration. Strava invalidates a refresh token as soon as it issues a new one, so if you exchange tokens outside Airbyte, use the latest refresh token when you update the source.

Troubleshooting​

  • Token refresh fails with a configuration error: If Strava rejects the refresh request with Bad Request or Authorization Error, the refresh token, Client ID, or Client Secret is invalid or has been revoked. Retrying the sync won't fix this. In Airbyte Cloud, re-authenticate the source. In Airbyte Open Source, generate a new refresh token or update the Client ID and Client Secret, then update the source.
  • activity:read_permission error: The token doesn't have the activity:read_all scope. Reauthorize with activity:read_all, make sure the athlete keeps the permission checked, and update the source credentials.
  • Application / Status / Inactive error: The Strava API application is inactive. Restore its access with Strava before retrying. Changing the Athlete ID or Start Date doesn't resolve this error.

Performance considerations​

Strava limits API usage per application. By default, read requests are limited to 100 requests every 15 minutes and 1,000 requests per day. The 15-minute limit resets at 0, 15, 30, and 45 minutes past the hour, and the daily limit resets at midnight UTC. Requests over the limit return HTTP 429 Too Many Requests.

The Activities stream requests 30 activities per page, and each page is one request. Syncing a long activity history from an early start date uses more requests. For details and information about limit increases, see Strava's Rate Limits documentation.

IP allow list​

If you use Airbyte Cloud and your organization restricts access to specific IPs, add the Airbyte Cloud IP addresses to your allow list.

Reference​

Config fields reference

Field
Type
Property name
integer
athlete_id
string
client_id
string
client_secret
string
refresh_token
string
start_date
string
access_token
"Client"
auth_type
string
token_expiry_date

Changelog​

Expand to review
VersionDatePull RequestSubject
0.4.12026-10-1588994Show a re-authenticate error when Strava rejects the refresh token or app credentials, and stop sending an unused scopes parameter on token refresh.
0.4.02026-10-0988212Fix OAuth token expiry and refresh-token rotation; validate activity permissions during setup. See the migration guide.
0.3.522026-06-3081265Update dependencies
0.3.512026-06-2380672Update dependencies
0.3.502026-06-1680056Update dependencies
0.3.492026-06-0979524Update dependencies
0.3.482026-06-0278990Update dependencies
0.3.472026-04-2877413Update dependencies
0.3.462026-04-2176782Update dependencies
0.3.452026-03-3175863Update dependencies
0.3.442026-03-1775088Update dependencies
0.3.432026-03-1074577Update dependencies
0.3.422026-03-0373975Update dependencies
0.3.412026-02-0372765Update dependencies
0.3.402026-01-2072132Update dependencies
0.3.392026-01-1471619Update dependencies
0.3.382025-12-1870608Update dependencies
0.3.372025-11-2570057Update dependencies
0.3.362025-11-1869586Update dependencies
0.3.352025-10-2968991Update dependencies
0.3.342025-10-2168515Update dependencies
0.3.332025-10-1467918Update dependencies
0.3.322025-10-0767456Update dependencies
0.3.312025-09-3066893Update dependencies
0.3.302025-09-2366371Update dependencies
0.3.292025-09-0965664Update dependencies
0.3.282025-08-2465412Update dependencies
0.3.272025-08-1665038Update dependencies
0.3.262025-08-0264020Update dependencies
0.3.252025-07-1263084Update dependencies
0.3.242025-07-0562682Update dependencies
0.3.232025-06-2862278Update dependencies
0.3.222025-06-1461608Update dependencies
0.3.212025-05-2560208Update dependencies
0.3.202025-05-0459581Update dependencies
0.3.192025-04-2759034Update dependencies
0.3.182025-04-1958385Update dependencies
0.3.172025-04-1257939Update dependencies
0.3.162025-04-0557411Update dependencies
0.3.152025-03-2956879Update dependencies
0.3.142025-03-2256280Update dependencies
0.3.132025-03-0855588Update dependencies
0.3.122025-03-0155095Update dependencies
0.3.112025-02-2254482Update dependencies
0.3.102025-02-1554087Update dependencies
0.3.92025-02-0853562Update dependencies
0.3.82025-02-0153075Update dependencies
0.3.72025-01-2552019Update dependencies
0.3.62025-01-1151460Update dependencies
0.3.52024-12-2850764Update dependencies
0.3.42024-12-2150337Update dependencies
0.3.32024-12-1449777Update dependencies
0.3.22024-12-1249432Update dependencies
0.3.12024-10-2847601Update dependencies
0.3.02024-08-2744820Refactor connector to manifest-only format
0.2.172024-08-2444667Update dependencies
0.2.162024-08-1744354Update dependencies
0.2.152024-08-1043588Update dependencies
0.2.142024-08-0343283Update dependencies
0.2.132024-07-2042131Fix bug in start date format in manifest
0.2.122024-07-2042353Update dependencies
0.2.112024-07-1341933Update dependencies
0.2.102024-07-1041499Update dependencies
0.2.92024-07-0941201Update dependencies
0.2.82024-07-0640970Update dependencies
0.2.72024-06-2540393Update dependencies
0.2.62024-06-2139941Update dependencies
0.2.52024-06-0639221[autopull] Upgrade base image to v1.2.2
0.2.42024-04-1937266Updating to 0.80.0 CDK
0.2.32024-04-1837266Manage dependencies with Poetry.
0.2.22024-04-1537266Base image migration: remove Dockerfile and use the python-connector-base image
0.2.12024-04-1237266schema descriptions
0.2.02023-10-2431007Migrate to low-code framework
0.1.42023-03-2324368Add date-time format for input
0.1.32023-03-1524101certified to beta, fixed spec, fixed SAT, added unit tests
0.1.22021-12-158799Implement OAuth 2.0 support
0.1.12021-12-068425Update title, description fields in spec
0.1.02021-10-187151Initial release supporting Strava API