strava / go.strava

A complete client library for the Strava V3 API
http://strava.github.io/api
266 stars 67 forks source link

How should one get a Refresh token? #37

Open dmacexos opened 4 years ago

dmacexos commented 4 years ago

I want to get and store a refresh token after allowing a user to authenticate and link accounts, so my application can pull data when it wants without user interaction.

To do this, I have to get and store a refresh token which I can use to refresh the access token when I want. The access token only lasts six hours.

However, I can't find where the refresh token is exposed.

I tried using the access token returned from a Success from OAuthAuthenticator, but I only get "Status:400 Bad Request StatusCode:400 " to my call to my PostForm call to "https://www.strava.com/oauth/token".

How should I proceed?