Curious about our API? Connect with our developers to share ideas, knowledge, and feedback
Recently active
The following post request is returning an authorization error (401).What steps can I take to fix this?https://www.strava.com/oauth/token?client_id={client_id}&client_secret={client_secret}&code={code}&grant_type=authorization_codeReturning:{ "message": "Authorization Error", "errors": [ { "resource": "Application", "field": "", "code": "invalid" } ]}
Dear allI'm using SwiftUI code to upload files to Strava's API. Upload is working finde. If I add name and description to my upload body, it is recognized by the API and displayed at my activity dashboard.However, "commute" (as INT), "trainer" (as INT), or "sport_type" (as STRING) keep being ignored.Thats part of my code to create the POST request body:// Append file data to request body bodyData.append("--(boundary) ") bodyData.append("Content-Disposition: form-data; name=""file""; filename=""(file.url.lastPathComponent)"" ") bodyData.append("Content-Type: application/(fileType) ") (...) // Append sporttype bodyData.append(" --(boundary) ") bodyData.append("Content-Disposition: form-data; name=""sport_type"" ") bodyData.append("(file.sportType) ") // Append name bodyData.append(" --(boundary) ") bodyData.append("Content-Disp
Dear Strava Team,I hope this message finds you well.We submitted the Device Mapping Request for our SCINST Robin device (Application ID: 134483) over 50 business days ago, but we have yet to receive any response or update. We understand that the review process may take time, but given the extended period, we kindly request an update on the status of our request.Additionally, we would like to inquire whether modifying the content of the form during the review process would reset the response time.Your prompt feedback would be greatly appreciated, as we are eager to move forward with integrating our device with Strava.Looking forward to your reply.
When I'm uploading an activity using a GPX file, I would very much like to set the sport type correctly. Otherwise it seems like a convoluted method just to update that type. For some reason the activity just ends up being a run. Any thoughts?
Hello, for some time now I can't see the map when I click on the current activity. The map appears on my profile in progress, but if I go to it to see details, it doesn't work, the application refreshes or goes to the main page. I can only see the map on a computer. I'm attaching some screenshots. I use a Huawei bracelet (health application) band 7 with automatic upload to Strava
Hi, I am writing an application in which I would like to record activity in Strava. I am running such url var authUrl ="https://www.strava.com/oauth/authorize" +$"?client_id={_clientId}" +"&response_type=code" +$"&redirect_uri={Uri.EscapeDataString(redirectUri)}" +"&approval_prompt=force" +"&scope=activity:read_all,activity:write"; authorizes with my Strava account and gets a new token along with this scop scope=read,activity:write,activity:read_all Then performs a POST of this code to https://www.strava.com/oauth/token All operations go through without error but after refreshing the API mouthpiece I still see scope:read and as I try to save the activity I get an error
Hi All,I'm experiencing a maps problem: I can see my routes and those of the people I follow only in a "preview mode". When I click on the route Strava doesn't show anything and the app crash going back to the main page. What's going wrong? Please help me.Thanks!Patrizio
I am on the committe of a running club and we wanted to use the API to track our athletes and give recognition, awards etc. However, the API /clubs/{id}/activities returns a maximum of 200 activities for me - can this be changed?In addition, the activities have no date or activity ID, which meens I can't analyse (for example, most runs or highest distance in a period).I have the rights to see this detail - it's visible in the app or website - how can I get it through the API?ThanksPeter
Since the 27 of february mu Webhook stopped to work.I did not received any activities since that date.Strava even did not try to reach my Webhook ‘( i see it in my logs ).So i tried to delete the previous webhood subscription and re create IT, and it does not succeed.Anybody with same issue ?Any clues to help me ?Thank you
This is my local url: https://www.strava.com/oauth/authorize?client_id=146505&response_type=code&redirect_uri=http://127.0.0.1:8001/api/v1/user/strava-authorize/1/2020-06-20T23:16:53.000Z&approval_prompt=force&scope=read,activity:read_all But when I put the production URL I get this: https://www.strava.com/oauth/authorize?client_id=146505&response_type=code&redirect_uri=www.raiseday.run:8001/api/v1/user/strava-authorize/1/2020-06-20T23:16:53.000Z&approval_prompt=force&scope=read,activity:read_all And in the api section https://www.strava.com/settings/api I have the url configured, what will be the problem in production
For some reasons my Embed club on my website isn't showing anymore. Just shows it's a dead end.Other embed code works. Anyone has the same issue or an idea for a possible solution?Club is set to public.
I’m building a “low-budget” Strava integration for our company Ride to Work program, using Google Sheets & Apps Script. Once a user is authorized, my script has no problem retrieving activity data. However, I’m stuck on the authorization.Specifically, when a user follows my Apps Script deployment URL and clicks on the “Authorize with Strava” link, they’re prompted to log in, and then get the “We sent you a code” response. Except, no code is sent. I’ve tried multiple users, and confirmed that in a neighboring tab they can log into Strava without issue. I can also take the https://www.strava.com/oauth/authorize?... link with the proper arguments and manually produce an oauth code after logging into Strava.So the jist of it is, there seems to be no way to actually log in from the context of a Google Apps Script web deployment. Any ideas?
I would sometimes get an error when calling the token exchange API: POST https://www.strava.com/oauth/token, but it would work if I make the exact same call for a second attempt. Anyone know why this is happening? In the “authenticaion” documentation on Strava Developers, one statement says the URL should be https://www.strava.com/oauth/token, while an example shows the URL as https://www.strava.com/api/v3/oauth/token (I pasted below) Is this why my call to the API returns an error sometimes? Thanks.===================================================Token ExchangeStrava will respond to the authorization request by redirecting the user agent to the redirect_uri provided.If access is denied, error=access_denied will be included in the query string.If access is accepted, code and scope parameters will be included in the query string. The code parameter contains the authorization code required to complete the authentication process. code is short lived and can only be used once. The applic
Hi guys! I could use some help here. I’m trying to implement concurrency with my Strava API calls such that I can acquire activities on various athletes concurrently instead of one by one. However, despite my best efforts, I think there may be a limitation with the Strava API which does not support asynchronous operations. I tried wrapping the read requests within async.to_thread() but that didn’t seem to work. Have any of you guys bypassed this Strava limitation to get concurrency working? Thanks.
Hello,I'm having an issue with the Strava API that I hope someone can help me resolve. I'm able to successfully make API requests through Postman, but when I implement the same code on my server, I get a 403 error.What works (in Postman):I'm trying to access activity data with this endpoint: GET www.strava.com/api/v3/activities/[activity_id]With the authorization header: Authorization: Bearer [my_token] The error I'm getting on my server:I'm using PHP with cURL for my implementation. Here's the error I receive:403 ERROR The request could not be satisfied. Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Generated by cloudfront (CloudFront This implementation has been working perfectly for months, but suddenly stopped working this weekend. Nothing changed on my end.
Hi all,i try to get the annual kilometers of a club via API. In the dashboard i only see some weekly kilometers. is there any chance to get annual kilometers? thanks for helping
I really wanted to create a little app that would update all of my commute activities to be private via the API.I keep getting successful call backs and it looks like I can modify activities in other ways, but can’t seem to change the visibility of an activity no matter how hard I try… Of course I can do it manually in the app, but I want this little application to work. Any thoughts?
How do I get active calories from Garmin Connect when syncing rides to Strava? I’m getting total calories from GC which is active plus basal calories. Other apps report/use active calories, not total. I did some searching having found this being resolved. Has it been?
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?
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.