cancel
Showing results for 
Search instead for 
Did you mean: 

Get recent athlete photos

alexislg
Mt. Kenya

Is there any way to get the last uploaded photos of an athlete?
Like the native strava app is doing when you visit an athlete profile.

Currently, the only way of doing this is to loop over the last activities of an athlete and call the /activity/{activity_id}/photos?size=2048 endpoint.

But of course it is long and will raise a 429 Too many requests.

Something like /athlete/photos or something would be nice but it does not seem to exist

1 REPLY 1

ActivityFix
Superuser
Superuser

I don't think there is any endpoint for the most recent photos. The only two suggestions I can make to possibly improve over what you are currently doing (or maybe this is already how you do it?):

1. Use getLoggedInAthleteActivities to retrieve the last X activities and check each result for photo_count > 0 so you're only calling the /activity/id/photos endpoint when necessary. That could reduce the number of API calls made unless the person has photos in every activity.

2. Cache the photo URLs as you get them from your webhook (assuming you have one set up). That way you can spread out the queries over time rather than try to do them all at once. Remove older entries from the cache as new ones come in. This is a bit of a grey area as the API agreement has some mixed language on whether caching is allowed. See 2.Q.xxvii and 7 in the API Agreement . From my reading, I think you are allowed to cache that information for up to a week? You could always email developers@strava  to get some clarification.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings