Reputation: 33
I just would like to know how I can access strava users' data.
I got the key and the secret.
and how I can make the authentication to get users permission and get the access token ?
Upvotes: 1
Views: 5808
Reputation: 202
You can see the process herehttp://strava.github.io/api/v3/oauth/.
You will get the key and secret code once you register your app in strava. Now, to get users access code you will need to share the acceptance link - something like this https://www.strava.com/oauth/authorize?client_id=9&response_type=code&redirect_uri=http://localhost/token_exchange.php&approval_prompt=force with the user and request them to authorize your app. Once user authorizes your app, he will be redirected to your website with the access code in the query string. (http://localhost/token_exchange.php?state=&code=9d89636f3ad420fad5727e8591193aeeab9b2310). For eg. in the above URL access code is - 9d89636f3ad420fad5727e8591193aeeab9b2310.
Upvotes: 5
Reputation: 859
The process is described here: Strava oauth v3
I've built a project, which demonstrates how you can access user data from strava: Acceler8
There is also a sequence diagram which demonstrates the interaction.
Hope this helps to get you started.
Upvotes: 4