Python Forum

Full Version: Getting data from strava
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I want to Import and Analyse data from strava. I have no experience with it, but Little experience with python.
I use Spyder within anaconda for coding.

I already created a API on strava, but I donĀ“t know what to put into the Website field. So far I entered this: https://nikolausjaeger.wixsite.com/test (a Website created by my own)

Now I tried this Code:
from stravalib.client import Client

client = Client(access_token='GOT_IT_FROM_STRAVA')
activities = client.get_activities(limit=1000)
sample = list(activities)[0]
sample.to_dict()
and got this error:
Error:
AccessUnauthorized: Unauthorized: Authorization Error: [{'resource': 'AccessToken', 'field': 'activity:read_permission', 'code': 'missing'}]
Can anybody help me?
Thanks!
Based on the code posted, the access_token would likely be the error. It most likely requires an OAuth token to prove valid credentials were passed to Strava.