-
Notifications
You must be signed in to change notification settings - Fork 0
Strava API Calls
There are multi-steps to getting access to Strava Athlete information
-
You need to use the following API to get a user to approve access to their information : http://www.strava.com/oauth/authorize?client_id=40250&response_type=code&redirect_uri=http://localhost/exchange_token&scope=read,activity:read,activity:read_all&approval_prompt=force
-
You then need to exchange the code which comes back from this for an access code using the following api : https://www.strava.com/oauth/token?client_id=40250&client_secret=700b02392cd20d926d066de6a28601acb90772a8&code=1a7ee6bde672a19092178d00e7bd988e21cfc5fa&grant_type=authorization_code. The code is a temp one returned from 1.
This gives you an access code which lasts for 6 hours and a refresh code which can be used to refresh it as required.
You can then call the following API’s :
- Get Athlete information : https://www.strava.com/api/v3/athlete
- Get Activities for the user : https://www.strava.com/api/v3/athlete/activities
- Get the milage for a given piece of information : https://www.strava.com/api/v3/gear/b5361239