You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,23 +29,37 @@ bundle exec rake
29
29
30
30
### Obtain a Strava Token
31
31
32
-
The token from the Strava website does not have enough permissions to retrieve your own activities.
33
-
Use the [strava-oauth-token tool](#strava-oauth-token) to obtain a short lived with more access scopes.
32
+
The token from the Strava website does not have enough permissions to retrieve your own activities, therefore you need to complete the OAuth workflow with additional permissions.
33
+
34
+
Use the [strava-oauth-token tool](#strava-oauth-token) once.
34
35
35
36
Obtain `STRAVA_CLIENT_ID` and `STRAVA_CLIENT_SECRET` from [My API Application](https://www.strava.com/settings/api).
36
37
37
38
```bash
38
39
export STRAVA_CLIENT_ID=...
39
40
export STRAVA_CLIENT_SECRET=...
41
+
40
42
bundle exec ruby bin/strava-oauth-token
41
43
```
42
44
43
-
This will open a browser window. Complete the OAuth workflow and note `access_token`.
45
+
This will open a browser window. Complete the OAuth workflow and note `refresh_token` and `access_token`. Set `STRAVA_ACCESS_TOKEN` to the value of `access_token`.
44
46
45
47
```
46
48
export STRAVA_ACCESS_TOKEN=...
47
49
```
48
50
51
+
You can repeat the process above when the token expires, or use the `refresh_token`, which is faster.
52
+
53
+
```bash
54
+
export STRAVA_CLIENT_ID=...
55
+
export STRAVA_CLIENT_SECRET=...
56
+
export STRAVA_API_REFRESH_TOKEN=...
57
+
58
+
bundle exec ./bin/strava-refresh-token
59
+
```
60
+
61
+
Set `STRAVA_ACCESS_TOKEN` to the value of `access_token`.
62
+
49
63
### Create a Topic Branch
50
64
51
65
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
0 commit comments