Getting Started

Register your app on Strava and make your first API request in under 5 minutes.

Quick Start Steps

  1. 1Create a Strava account (if you don't have one)
  2. 2Register your application on Strava
  3. 3Get your Client ID and Client Secret
  4. 4Make your first API request

Step 1: Create a Strava Account

If you don't already have a Strava account, you'll need to create one first. Visit strava.com/register to sign up. A free account is all you need to start developing.

Step 2: Register Your Application

Navigate to the Strava API Settings page and click "Create & Manage Your App" or fill out the application form directly.

Required Information

Application Name
A unique name for your app (shown to users during authorization)
Category
Select the category that best describes your app
Club
Optional - associate your app with a Strava club
Website
Your app's website URL
Application Description
Brief description of what your app does
Authorization Callback Domain
The domain Strava will redirect to after authorization. Use localhost for development.

Tip: For local development, set the callback domain to localhost. You'll update this to your production domain when you deploy.

Step 3: Get Your API Credentials

After creating your app, you'll see your API credentials on the "My API Application" page:

CredentialDescription
Client IDYour application's unique identifier
Client SecretSecret key for authentication (keep this secure!)
Access TokenYour personal token for testing (expires every 6 hours)
Refresh TokenUsed to get new access tokens when they expire

Security Warning

Never expose your Client Secret or tokens in client-side code, public repositories, or logs. Always store credentials securely using environment variables.

Step 4: Make Your First API Request

Use the Access Token from your app settings to make a test request. This token only has access to your own data and is perfect for testing.

Using cURL

curl -X GET "https://www.strava.com/api/v3/athlete" \
     -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Using JavaScript (fetch)

const response = await fetch('https://www.strava.com/api/v3/athlete', {
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
  }
});

const athlete = await response.json();
console.log(athlete);

Using Python (requests)

import requests

response = requests.get(
    'https://www.strava.com/api/v3/athlete',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)

athlete = response.json()
print(athlete)

Example Response

{
  "id": 12345678,
  "username": "athlete_username",
  "firstname": "John",
  "lastname": "Doe",
  "city": "San Francisco",
  "state": "California",
  "country": "United States",
  "sex": "M",
  "premium": true,
  "created_at": "2015-03-21T18:04:07Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "profile": "https://dgtzuqphqg23d.cloudfront.net/...",
  "profile_medium": "https://dgtzuqphqg23d.cloudfront.net/..."
}

Next Steps

Now that you've made your first API request, here's what to learn next: