Curious about our API? Connect with our developers to share ideas, knowledge, and feedback
Recently active
When I use the python API to get the activities from the logged in user, I want to display the heart rate as well, which i don't get in the summary and thats already annoying.So I need to make a separate call to the activity/{id}. But now I find out that i don't get the ID in the summary either. I've tried to upload_id but thats not working either. Does anyone have a solution for this?
I would like to show to my users that they are using the Strava API with limit (100 request per 15 minutes, etc.)The Strava API has HTTP response header for that : X-Ratelimit-Usage and X-Ratelimit-Limit I would like to use them in the HTTP javascript fetch API. But I need the CORS Setting for that: Access-Control-Expose-Headers Thanks if you can add it. 😊
Hi, I'm having problems exchanging the access code for the token.I'm in Android Studio in Java.First I load this URL into my Web View :String authUrl = "https://www.strava.com/oauth/authorize?" + "client_id=" + clientId + "&redirect_uri=" + redirectUri + "&response_type=code" + "&scope=activity:read_all";I get the authorization code.But then when I load the token exchange URL :String authUrl = "https://www.strava.com/api/v3/oauth/token?" + "client_id=" + clientId + "&client_secret=" + clientSecret + "&code=" + code + "&grant_type=" + "authorization_code";I get this type of message : {"message":"Record Not Found","errors":[{"resource":"resource","field":"path","code":"invalid"}]} I don't understand why I get it, I've tried different ways but the documentation seems to be outdated? In the getting started page they say to do : https://developers.strava.com/docs/getting-started/
HiI want to do some REST requests. Is it possible to authorize without having to use the login screen?
Hey!I'm trying to build a personal website that displays my weekly mileage through Strava's API!Unfortunately I keep getting the following error:message: 'Authorization Error', errors: [ { resource: 'AccessToken', field: 'activity:read_permission', code: 'missing' } ]I read a lot of forums online, videos, and the docs, I can't crack this problem and solve it.I printed out token request & response in my terminal, here it is:Token Request URL: https://www.strava.com/oauth/token?client_id=108355&client_secret=[KEEPING THIS PRIVATE] &refresh_token=[KEEPING THIS PRIVATE]&grant_type=refresh_token&response_type=code&approval_prompt=auto&scope=activity%3A+read_all Token Response: { token_type: 'Bearer', access_token: '[KEEPING THIS PRIVATE]', expires_at: 1707040367, expires_in: 20581, refresh_token: '[KEEPING THIS PRIVATE]' }As you can see, the URL is set to the scope = activity: read_all.I'm a little baffled on why I keep get
Hello,We are noticing that we are reaching the limits in terms of read frequency and the number of athletes currently connected to our app based on the API.How can we increase this?Kind regards, Wouter
Hi there!I'm retrieving my latest run with the following endpoint: /athlete/activities and then the method "getLoggedInAthleteActivities". This works well, but I don't get the same response as the sample response given there. I don't get anything back from my heart rate information. Is this a permissions thing or am I missing something?
Hello,I've encountered an issue when uploading TCX files through code, where the splits view and calorie data aren't displayed on the website, despite these details showing up correctly when I upload the same file manually through the website.Here's what I've done:Initial upload via code: When I upload a TCX file programmatically (using code), the activity appears on Strava, but without splits or calorie information.Manual upload for comparison: To ensure the issue wasn't with the file itself, I uploaded the same TCX file manually through the Strava website. Interestingly, this time, both splits and calories were visible.Verification process: I took an extra step to download the activity file that I uploaded through the website (whiich showed splits and calories) and compared it with the original file I was trying to upload via code. Upon comparison, both files were identical, confirming no difference in the data.This situation leads me to believe there might be a difference in how fil
HI,I'm currently looking into using the strava api to export my activities to Gpx/Tcx (or any other format that suits my needs) because Garmin doesn't offer such a service / api. When looking into the data and comparing an activity from Garmin, exported in TCX format, with the data I can collect using the streams/laps api I noticed a few things?1. The start/endindex of the first lap sometimes seem to be 0? Why can this happend and how should I deal with this? Since the lenght of the lap corresponds with the length found in Strava/Garmin ui.2. The endIndex of the last lap doesn't correspond with the last index in the stream data? F.i. 1980 for the size in the stream. 1956 in the lap data?Can someone explain to me why this could happen? And how to work with it?
Hello,I'm trying to load data from a segment `/api/v3/segments/[id]` that gives me a "Rate Limit Exceeded" error.However, the quota does not seems to be reached: I log the usage and I get something like: Instant usage: 75/600 - Daily usage: 4392/6000.I dig into the logs and it seems that it stopped working at half the quota, 3000/6000.Is there any other limitation I'm not aware of?
Has gear-related data that is retrievable by APIs been updated since the default gear by sport update (https://stories.strava.com/articles/set-default-gear-by-sport)?I was expecting that the data returned by getActivityById would have gear > primary set to True if the gear used is the primary gear for the activity's sport type (or at least, if that gear was primary for that sport at the time of creation of the activity). However, I'm seeing primary still set to False in that case, so I'm wondering if that field refers to a now defunct global default setting for gear. How can I retrieve whether gear is primary for a sport type with by API?
Hi, I am trying to implement Strava webhook but I need to call the subscription API first to create a webhook subscription. I keep getting the following error for some reason even though I am doing everything according to the webhooks documentation:{ "message": "Bad Request", "errors": [ { "resource": "PushSubscription", "field": "callback url", "code": "not verifiable" } ]}This is my callback url:https://app.6amrun.com/api/1.1/wf/strava_webhook_live
I would like a faster method of querying a detailed representation for a list of Strava activities. I can make a single query via:/activities/{id}However, I have 1000 activities and need to make a seperate call for each acitivity id. And this takes too long.It would be nice to be able to query on a list of activity ids. Is this possible?Side note: The same question was stated nicely on another forum. I did not write it, but will link for clarity.
Hello,I created a website to show my activities on my website.This works great. It shows a map with my followed routes.But is it possible to hide my activities on the strava-app itself and not on my website?So only myself can look at strava and other strava users can only look at my website?Thnx in advanced.
Hi, I would like to know how to make a query on a segment using the API, and how to filter with the parameters that appear in the sorting table. For example: https://www.strava.com/segments/16956881
The API docs says that both getActivityById and getRouteById should return both a map.polyline and map.summary_polyline. However, my activities only have a polyline and don't have a summary_polyline. My routes, meanwhile, only show summary_polyline and no polyline. Am I missing something?Also, does anyone have a good description between polyline and summary_polyline?
My understanding is that the only way to register multiple apps is to create an account for each, as a single account cannot be associated with more than one app. As such I set up a new account, however was unable to register my new app as I did not have permission to access strava.com/settings/api. In the UI this appeared as the "My API Application" button not being present. I was unable to find any documentation discussing this, but then decided to sign up for the trial subscription and it worked fine from then on.This seems wrong as devs surely should not be expected to create and subscribe to a new account if they are woking on multiple apps as I am. Also there is no mention of this being a feature of a sub, if it were intentional.Perhaps I am missing something or if not, could someone from Strava please help clarify the rational here?
Hello,In the API is the Activity.total_elevation_gain field populated with Strava-corrected elevation or the elevation data originally recorded by the device / app? The documentation just states: "The activity's total elevation gain." Thanks
Hi all, I've noticed that my webhook is called 3 times when an activity is added or edited. Any reason why this is? There's obviously only one webhook setup at the strava side. I see them in my server logs with something like 7 minutes between them. There are push notifications in my app based on information from the webhook, so now people are getting multiple notifications. What can I do to debug this? My server responds with an empty json response within the specified 2 seconds. Thanks.
Wondering if someone could help - I'm trying to obtain totals for an athlete. I have managed to get all activities, but would also like totals.This is the following code I am using:stats_url = f"https://www.strava.com/api/v3/athletes/{client_id}/stats?" f"access_token={access_token}" statsresponse = requests.get(stats_url) stats = statsresponse.json() print('Stats API:', stats_url) ride_total_year_calculated = round(stats['ytd_ride_totals']['distance']/1000,1 ) When copy and pasting the URL I get the following response: {"message":"Forbidden","errors":[]} I'm obviously doing something really stupid here, but can't see it right now! For further info, the following works:activities_url = f"https://www.strava.com/api/v3/athlete/activities?" f"access_token={access_token}" print('RESTful API:', activities_url) response = requests.get(activities_url, params=params) print(len(response.json())) for i in range(0,len(response.json())): acti
Bonjour,Voici une idée concernant le développement des KOM et de la ludification des activités sportives sur STRAVA. Je me suis posé la question s'il était possible d'établir des KOM millésimés (KOM-2023 / KOM-2024 ....) en conservant également le KOM général qui se base sur la meilleure performance de tout temps sur un segment. Cela permettrai d'offrir la possibilité à chacun de décrocher un KOM annuel sur les segments. Celui-ci remis en jeu à chaque nouvelle année un peu comme l'esprit d'une course ou il existe un record de tout temps (le KOM général) et un vainqueur par édition (KOM Annuel ou KOM Millésimé).Cordialement,Pierre KOCH TRANSLATION: Good morning,Here is an idea regarding the development of KOMs and the gamification of sports activities on STRAVA. I asked myself the question if it was possible to establish vintage KOMs (KOM-2023 / KOM-2024....) while also retaining the general KOM which is based on the best performance of all time in a segment. This will ma
Hola, alguien utiliza otra app que no sea la de Motorola para sincronizar las actividades a strava??? Hoy dejo de andar me pide migrar a otra app pero la misma no está disponible en mi país!!! TRANSLATION: Hello, does anyone use another app other than Motorola's to synchronize activities with Strava??? Today I stopped walking and it asks me to migrate to another app but it is not available in my country!!!
Hello, I have a problem with strava authentication. When the user logs in for the first time everything goes well. However, during subsequent connections it still requires authorization to connect to the Strava account instead of directly connecting it to my application. The approval_prompt parameter is of course "auto". I don't see where the problem could be. Thanks in advance
The Strava API Brand Guidelines state:> You must link back to all original Strava data sources presented in your applicationIs there any documentation that gives any more detail on how to do this? When I first read this I had assumed that the API responses would provide links back to the Strava resource, but that doesn't appear to be the case.Some questions:- Is it okay to link back to the Strava web app, or does it have to link to the precise resource?- On mobile, should this link to the Strava mobile app (deep link), or to the Strava web app?- How can we know the url to link to?
I have written a python script to modify the visibility of all my recorded activities from "only_me" to "everyone". The script works and the return from the api indicates that the update was performed successfully. However in reality the privacy flag is not changed. Is that a limitation of the api?
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.