stravalib icon indicating copy to clipboard operation
stravalib copied to clipboard

stravalib.exc.AccessUnauthorized error

Open fabthegreat opened this issue 6 years ago • 4 comments

Hello,

Thanks for this promising API!

My code is quite simple:

from stravalib import Client

client = Client('8***7')
athlete = client.get_athlete() 

print("Hello, {}. I know your email is {}".format(athlete.firstname, athlete.email))

friends = client.get_athlete_friends()
      
for f in friends:
    print('hello')

first print for athlete firstname and email work fine but for friends it returns: stravalib.exc.AccessUnauthorized: Unauthorized: Authorization Error: []

How to solve this?

Thanks

fabthegreat avatar Dec 07 '18 21:12 fabthegreat

Doesn't look like that is available any more.

The code is calling the following route: '/athletes/{id}/friends' and references http://strava.github.io/api/v3/follow/#friends as documentation. However I can't see any reference to it in the playground nor the API docs: https://developers.strava.com/playground/

Strangely can't see any deprecation notice in the changelog either.

alasspri avatar Apr 11 '19 23:04 alasspri

I programmed like @fabthegreat 's code. But I can't access friends/followers list, too. Is unusable this feature? If so, need to update API documentation as soon as posible.

dongbum avatar Aug 05 '19 08:08 dongbum

Hi all -- sorry for the silence on this. Yes, indeed, it appears this was removed from the Strava API -- presumably along with all the other removals from big privacy refactor.

I'll leave this open as a documentation issue.

hozn avatar Aug 05 '19 16:08 hozn

@hozn Thanks to reply. I suggest, how about add mark as 'deprecated' in documentation? ( https://pythonhosted.org/stravalib/usage/athletes.html#friends-and-followers )

Because most people read the documentation first. And they will find this issue page after find problem.

dongbum avatar Aug 06 '19 01:08 dongbum