Strava API Calls - Gotteschalk/bike_component_tracker GitHub Wiki

Calling the Strava APIs.

There are multi-steps to getting access to Strava Athlete information

  1. 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

  2. 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 that lasts for 6 hours and a refresh code that can be used to refresh it as required.

You can then call the following API’s :

When you get back the access code for a user, you also get back a refresh code. This is used to refresh the access code when it has run out.

Reference Documentation

Full documentation for how to get and refresh the access codes can be found here: https://developers.strava.com/docs/authentication/

The full list of available API's can be found here: http://developers.strava.com/docs/reference/