Search code examples
javascriptapifetch-apileaderboardstrava

Strava api: segment leaderboard two people with same name


I am 16, creating a website that shows all Strava's segment leaderboard, but Strava only gives you the name as "Paul M." for example. when fetching the API there was two Paul M's so there was no way to distinguish between these to people and put their individual score on my website.

Using this link you can see the API data: https://www.strava.com/api/v3/segments/23430539/leaderboard?club_id=318793&page=1&per_page=100&access_token=fd1971ba756d8d479623a62cb59115a688131077

I just wondered if anybody else has had this problem?

if the link doesn't work just comment it will be because the access token has expired and I have created a function to dynamically create a new one, which I can give you

const link = `https://www.strava.com/api/v3/segments/23430539/leaderboard?club_id=318793&page=1&per_page=100&access_token=fd1971ba756d8d479623a62cb59115a688131077`

fetch(link)
    .then((res) => console.log(res.json()))
    
//the data is in the console log as a JSON object //


Solution

  • is the first set of numbers unique to the persons profile and stays the same. Could this be used to identify the user as an id

    29T11:10:22Z","start_date_local":"2020-04-29T12:10:22Z","rank":1},{"athlete_name":"Ray R.","elapsed_time":1879,"moving_time":1879,"start_date":"2020-04-