This project is a Go application that interacts with the Strava API to refresh tokens and fetch activities.
- Go 1.16 or later
- A Strava account and API credentials
- A
.env
file with your Strava API credentials
-
Clone the repository:
git clone https://github.com/code-with-brian/frugal-thinker-sync.git cd frugal-thinker-sync
-
Install dependencies:
go mod tidy
-
Create a
.env
file in the root directory of the project and add your Strava API credentials:STRAVA_CLIENT_ID=your_client_id STRAVA_SECRET=your_client_secret STRAVA_REFRESH_TOKEN=your_refresh_token
Run the application:
go run main.go
The application will:
- Load the environment variables from the .env file.
- Use the Strava API credentials to refresh the access token.
- Fetch activities from Strava using the new access token.
- Print the activities in JSON format.
Dependencies github.com/code-with-brian/frugal-thinker-sync/strava github.com/joho/godotenv