简体   繁体   中英

get access to users' data using Strava API

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 ?

You can see the process here http://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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM