Curious about our API? Connect with our developers to share ideas, knowledge, and feedback
Recently active
I’ve noticed that my application will sometimes stop receiving webhook events from some athletes. These athletes have not deauthorized my application, so I should still be receiving events for them. I have checked with these athletes and they have confirmed that my application is still authorized. I’m wondering, does Strava stop sending webhooks events for an athlete if the athlete’s access token needs to be refreshed? Currently, if I get a notification from an athlete that has an expired access token, this triggers a refresh call. But do I need to be actively refreshing tokens right as they expire to make sure that I don’t miss webhook events? This is not mentioned in the documentation afaik.
I use an R script to retrieve my personal activity data from Strava using the API. I use the following code, that, in the past, always gave me data on average and max heart rates, but now these have disappeared for some reason: while (TRUE) { req <- httr::GET( url = "https://www.strava.com/api/v3/athlete/activities", config = token, query = list(per_page = 200, page = page) ) # Convert JSON to dataframe activity_data <- fromJSON(content(req, as = "text"), flatten = TRUE) # Stop if no data found if (length(activity_data) == 0) {break} # Append data to dataframe if (nrow(df) == 0) {df <- activity_data} else { common_cols <- intersect(names(df), names(activity_data)) df <- rbind(df[, common_cols, drop = FALSE], activity_data[, common_cols, drop = FALSE])} # Turn to next page page <- page + 1}Anyone has an idea why the heart rate data is missing?
This model won't include any athlete identifier, which makes the information a bit useless in the end. Since APIs are made for machines, and machines identify entities differences between IDs, not having them on the returned models make them invaluable.It would be nice if ClubAthlete had the athlete ID included within its definition. This way, apps for clubs, built on top of the Strava API, can easily map and identify the athletes. Otherwise this is impossible, as there's no other way of identifying athletes related somehow to another one who granted access to the app.
Hello,Recently, I built an app using the Strava API to automatically retrieve my activity data and store them in a database. I noticed that, using the “https://www.strava.com/api/v3/athlete/activities” API endpoint retrieves the calories as kilojoules, for example “"kilojoules": 637.0”. The calories shown in my Strava account are shown in calories units. Based on the same activity of the above example, I see in my account the value of 427 Cal. However, 637.0 kilojoules are 152.2 calories - that is, a very different number from 427 Cal shown in my account.I wanted to ask if I am missing any other conversion steps or how exactly are Calories calculated in the application but are different from the API? How can I transform the 637 kilojoules to the number that I am seeing in my account? Thank you very much for your help in advance.Best,Panos
Hi,I'm running the command:swagger-codegen generate -i https://developers.strava.com/swagger/swagger.json -l swift5The DetailedActivity does not contain any of the SummaryActivity as described by the allOf section in https://developers.strava.com/swagger/activity.json#/DetailedActivity.I've tried using version 3.0.41 and 2.4.30A quick search indicated that it is a swagger bug?Am I missing something here?Thanks Antz
https://developers.strava.com/docs/ specifies how to generate client code.I got the model generated java -jar C:\swagger-codegen-cli.jar generate --lang java --output C:\SwaggerCodeGen\strava-models --input-spec https://developers.strava.com/swagger/swagger.json --config C:\config.jsonThis is 1 of the config settings I used{ "groupId": "com.vschouppe.strava", "artifactId": "strava-api-client", "apiPackage": "com.vschouppe.strava.api", "modelPackage": "com.vschouppe.strava.model", "invokerPackage": "com.vschouppe.strava.invoker", "generateApis": true, "generateModels": true, "library": "resttemplate", "dateLibrary": "java8", "serializationLibrary": "jackson", "hideGenerationTimestamp": true}Why are my clients and api’s not generated?i.e.https://developers.strava.com/docs/reference/ import com.strava.api.v3.auth.*;import com.strava.api.v3.model.*;import com.strava.api.v3.api.ActivitiesApi; ApiClient client = new ApiClient(...); ActivitiesApi api = client.createService(Activit
Anyone know if it’s possible to directly add an image from the edit activity API?
Hallo, leider wird bei den Aktivitäten die Karte nicht mehr richtig angezeigt, man sieht nur die Tour mit blauem Hintergrund. Aber kein Satellitenbild mehr. Was kann man hier machen?
Hello!I am looking for a way to retrieve TCX file of activities with the API. I can get TCX for routes but can’t find a way to get the file for activities.I can get it easily using this way : https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export#h_01GDP2C5E3278KM8MPK5X49ED3 “This is a little-known trick, however, it's simple to use. Simply add "/export_tcx" - without quotes - to the end of your activity page URL. For example, if your activity page is www.strava.com/activities/2865391236 - just add the text to give you www.strava.com/activities/2865391236/export_tcx and hit enter. This will download a TCX version of your file to the location specified by your browser's preferences” But no luck with API.Can anyone help?Thanks!
Our bicycle club has authored a command line tool that connects to the Strava API to download an athletes ride data so we can establish metrics for ride difficulty in our region. However we just realized it won’t work because the number of athletes allowed to connect is only 1. To increase the limit we have to submit an application review form. However we just noticed the Strava API Agreement demands the app have some sort of GUI (Graphical User Interface) so that logos can be displayed. But a command line tool can’t display logos. Does that mean command line tools are prohibited from using the API? How do we get around this problem?
I’m exporting my Strava activities to a CSV with a Python script and for some reason, everything shows up perfectly except for the calories burnt. My weight is entered on Strava and I have tried a few different scripts but to no avail. Calories just don’t show up on my CSV no matter how I write, even though they do appear on my profile. Has anyone else encountered this? I looked up online but couldn't find anything, I don’t know if it’s a Strava issue or I just can’t seem to find the right script to write. Thanks!
I'm trying to authorize myself to use the strava API. I managed to get an access token and specifying the scopes. In order to be able to write data to one of my activities I need to pass in an authorization code (with the great help of @Jan_Mantau). On the internet I found examples of getting the url that would display the code. static async Task Main(string[] args){ // Step 1: Send user to authorization page var queryParams = new Dictionary<string, string> { { "client_id", clientId }, { "response_type", "code" }, { "redirect_uri", redirectUri }, { "scope", scope } }; var authorizeUri = $"{authorizeUrl}?{string.Join("&", queryParams.Select(kvp => $"{kvp.Key}={Uri.EscapeDataString(kvp.Value)}"))}"; Console.WriteLine($"Open the authorization url: {authorizeUri}"); // Step 2: User authorizes on page and get redirected to the redirect)uri with a code ...} https://www.strava.com/oauth/authorize?client_id=99999999&respo
Hello everyone,I'm currently working on a project that involves analyzing activity patterns on outdoor recreational paths. I'm seeking to access anonymized, aggregated geospatial data that could provide insights into usage patterns, such as peak times, flow of movement, and user demographics.I'm interested in exploring whether the Strava API could support this type of analysis, specifically looking into the volume of trail usage and general movement trends. If anyone has experience with the Strava API or a similar data source for these purposes, I'd appreciate your insights on the feasibility and any best practices you might recommend.Additionally, if there are suggestions for other APIs or open data sources that could serve this use case, please do share.
So 99% of the time my token exchange process works just fine, but occasionally Strava responds with a "Bad Request" message.I've confirmed that each authorization request is accepted, and I receive a query string formatted as expected, looking like:"code":"012345ab6c7d89e48d7e92a0e381024deb1f0a7b","scope":"activity:read_all,activity:write,profile:read_all,read,read_all"but occasionally the POST call to https://www.strava.com/oauth/token receives this response:{ "message":"Bad Request", "errors": [{ "resource":"AuthorizationCode", "field":"code", "code":"invalid" }]}This issue is so intermittent that I can't reproduce it, but I'm sure I only try to use the short-lived code once...Any ideas what might be going wrong?
I was trying to develop my code (in Python) to gather my club's data for a data science course project. The issue I have is that I'm learning that once I run the request using the authorization code one time, the second time won't work. Even if I get my access and refresh token, running the code in the main will end up running the function to use the authorization code so it'll become invalid and the code won't run. How do I solve this?Here is a picture to show what I mean:
i tried to collect club members activity using strava api. it gave only 180 activity feed. Even i used pagination concept still it gives duplicates of previous 180 data.
I see that my Elapsed time for my run is greater than the length of each activity streams, which I was not expecting.The activity streams are about the same length as the Moving time of the run, though there are elements in the ‘moving’ stream that have ‘False’ values (not moving). I think my understanding of what event streams are and how they are recorded are a bit off. Would someone be able to explain this? Thank you.
Hello, The Strava website provides a convenient way to get the .tcx files of a specific activity:https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export#h_01GDP2C5E3278KM8MPK5X49ED3This is a little-known trick, however, it's simple to use. Simply add "/export_tcx" - without quotes - to the end of your activity page URL. For example, if your activity page is www.strava.com/activities/2865391236 - just add the text to give you www.strava.com/activities/2865391236/export_tcx and hit enter. This will download a TCX version of your file to the location specified by your browser's preferences Is there a way to achieve this with the API? I can get .tcx file for routes but not for activities.Thanks for your help!
Hello. I created app. According to the instructions, I filled it out for testing to Swagger Playground. But when I try to log in, I get an error in the response:{ "message": "Bad Request", "errors": [ { "resource": "Application", "field": "redirect_uri", "code": "invalid" } ] }request url:https://www.strava.com/api/v3/oauth/authorize?response_type=code&client_id=117684&redirect_uri=https%3A%2F%2Fdevelopers.strava.com%2Foauth2-redirect%2F&scope=read&state=U3VuIERlYyAwMyAyMDIzIDIxOjA3OjQzIEdNVCswNzAwICjQndC%2B0LLQvtGB0LjQsdC40YDRgdC6LCDRgdGC0LDQvdC00LDRgNGC0L3QvtC1INCy0YDQtdC80Y8pWhat am I doing wrong?
Hello, I have an application that is used to upload gpx to strava from usb cable connected devices,it can also view activities general details - mostly track and map. It does not duplicate any strava functionality besides uploading gpx via API. It is a desktop app with 1 user only using his own api-application. I was autidted by the team, i got all the required stuff in the app (logos, strava promotion, links to activities ‘view on strava’ etc) and I got all the blessings, plus request limits set for the app. I am happy with that. But my question is - if I make the app public, and some people will download it and use as their private api applications, will that be a concern for me, or just they need to setup their api-app and use it. It is a one-user desktop app. Hope it sounds reasonable ;) if not I can give more details to strava team.
Dear Strava Support Team,My name is Seokwon Jung, and I live in Seoul, South Korea.Since the end of the pandemic, I have fully embraced running as a hobby and began using the Strava app last year while preparing for a full marathon.Currently, I work as a leasing manager for brand stores during the day time weekday, a graduate student researching urban commercial districts and real estate using big data and GIS at night, and an as a runner and marathon enthusiast on weekends, enjoying the Strava app.Given my background, I have recently become highly interested in Seoul’s running environment. Specific areas such as Hangang river Park and Seoul Forest are forming running communities, which have even attracted related brand antenna shops. Additionally, the Seoul Metropolitan Government has been implementing policies like “Runner’s Station at Yoeyido metro” or “WristDoctor 9988” to foster a better running environment.As such, I would like to analyze Seoul’s running (jogging) environment usi
Hi Team! It looks like I accidentally turned off the .Ai analytics feature. Is there a way to switch it back on?
I'm writing software that controls my treadmill. The idea is that I can run any run in the world, and the treadmill responds to the gpx data coming in and is doing all climbs as if it were the real world.At the end of a run, I want to upload my activity to Strava. And that is the point in which I get stuck….Using the client id, client secret I'm able to get a bearer token. This token has read permissions. In order to write to an activity I need write permissions. I cant figure out how I can exchange the bearer token for an authorization token that authorizes me to write data to the activity. Can anyone help me?
Hi,We asked for athlete count increase around 4 weeks back, but haven’t heard back.The ask was to increase the limit to 10K.Did we ask for a too big limit to start? as I see most people here get 999 limit.Can someone help us in expedite this, as this is blocking out our feature release which we have committed based on the timeline (7-10 days) which was shared with us. We are fine by 999 limit as well to get started.
Hello,I am student of high school and i got an idea to create webpage for the students of school and basicly create competition between the classes, which class will have run most km or on bike, or hiking in some period of time. For example in January had class “name of the class” run most km, so they won. The problem is that in my API application “the number of allowed athletes” is just one, and if I understand it correctly, i should send mail to strava so they will change it, right? So I wanted to ask if its not useless to send the mail considering the whole idea, if it makes sense? If its not just waste of time. Also I ve seen some information about data privacy, and what i wanted to do, was to display data of the activites that the users have done and also the data of the class as whole. So display who have how much kilometers run or cycled, and then which class has how much run and cycled. I dont know if its not problem considering the rules of strava API about the data privacy an
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.