D
D
Dima2020-04-20 21:29:58
API
Dima, 2020-04-20 21:29:58

What is the correct way to formulate an API request in Strava?

Explain to the stupid how to make an API request correctly? I need to get the number of kilometers driven this year. Here is what is written in the documentation (for some reason, the link does not lead to this section, on the left is the All Models column):

ytd_ride_totals
ActivityTotal
The year to date ride stats for the athlete.

However, I can’t formulate the query itself, since there is no example ¯\_(ツ)_/¯
The general principle is as follows:
https://www.strava.com/api/v3/athlete?access_token=MY_ACCESS_TOKEN

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Kuzyakin, 2020-04-21
@qpz

ytd_ride_totals can be obtained via a GET request like this:

https://www.strava.com/api/v3/athletes/[ID Пользователя]/stats?access_token=MY_ACCESS_TOKEN

the response will also contain all_ride_totals

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question