Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting data from strava
#1
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!
Reply
#2
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020