Generate Strava API OAuth2 access token for testing
Generate Strava API OAuth2 access token for testing purposes.
Used in pet projects:
Ruby executable. Tested on macOS with Homebrew Ruby environment managed by rbenv
.
```shell script
brew tap mgryszko/strava
brew install strava-access-token
## Usage
```shell script
strava-access-token <client_id> <client_secret>
If you don’t have a client id/secret, register your app following the official Strava documentation.
The script starts a local server (acting as an OAuth2 client) listening on port 8080.
Open your http://localhost:8080/ in your browser and authenticate against Strava. Access token will be displayed in the browser and downloaded to the current working directory as .access-token
.
Pre-requisite: install rbenv
(Ruby environment), then:
```shell script
rbenv install
rbenv local
### Run
```shell script
rbenv exec ruby strava-access-token <client_id> <client_secret>