Curious about our API? Connect with our developers to share ideas, knowledge, and feedback
Recently active
Hi Folks, Trying to use the API to upload activities recorded by a Chinese Bicycle Computer, that junk product cannot automatically upload data to Strava, so I have to write a script to get those fit files via adb, and then upload them to strava via api. However I got response like this: Upload failed: {"message":"Authorization Error","errors":[{"resource":"AccessToken","field":"activity:write_permission","code":"missing"}]} I used scope = ['activity:write'] when getting an access_token, and I found out I always get the same access token whatever I set the scope to be. That access token is also the one showed on https://www.strava.com/settings/api, under that I can see scope: read, just like https://communityhub.strava.com/t5/developer-discussions/authentication-scope/m-p/6357. In order to upload fit files I need a token with "activity:write", but I cannot find anywhere to change the scope of my access token. Of course I tried to solved this b
Hello everybody, I would like to livestream my first half marathon on Twitch. To make it more fun, I would like to display some real-time information about my race (heart rate, time per km, distance traveled...) by retrieving this information from the Strava application on my Apple Watch. Do you think this is possible? I'm just starting to code and I don't understand everything yet. If some people could enlighten me I would be very grateful. Thank you so much. Gael
We manufacture device and would like it mapped on Strava.therefore submitted a device mapping STRAVA request form, but it has been 10 business days and no response.Please tell me what is the reason?Will modifying the content of the form during the review process recalculate the response time?Looking forward to your reply!
Hi, can I get all rides or recent rides that are intersecting exact area?I want to build a website for local MTB trails and I want to include there a block with recent rides on the trails
Hi, I am new to Strava API development. I found examples of getting the segment leaderboard on the internet, but it's not in the API documentation and my code never returns anything so I am guessing those don't exist anymore. Any pointers? I would like to know the top10 times for segments. TIA!
Hi,We import activities from multiple sources, e.g. Garmin and Strava. When we receive a webhook message from Strava that a new activity has been created, we always have to do the following:Request the activity from Strava's API or request a list of the latest activities of the athlete (these are kind of equivalent, we do the former)Compare the start time (utc timestamp) of the activity with the activity start times that we have in our database. Under the assumption that a user cannot start two activities at exactly the same time, we can determine that an activity has already been imported from another source and then ignore it, or import it when we do not have it yet.It would be very convenient for us, and perhaps/probably also for others, when Strava's webhooks would also contain this start timestamp, so we can omit step 1 and thus, for bonus points, use up less of Strava's rate limit (and server time).
Activities via: https://www.strava.com/api/v3/activities Shows "elapsed_time" in seconds but if the activity is longer than 24hours it seems to only contain the remainder after the first 24hours e.g. https://www.strava.com/activities/3886452961/overview = 27:52:15/activities returns:"elapsed_time": 13935 = 3:52:15 https://www.strava.com/api/v3/activities/3886452961 returns: "elapsed_time": 100335 = 27:52:15 Is this known/expected behaviour? Seems like a possible bug?
Not sure if there is any guidance for this or if this is somehow expected? I have a run activity which is 27:52:15 long The API (https://www.strava.com/api/v3/activities) returns:"elapsed_time": 13935 Which is: 03:52:15 (obviously less 24) Activity id: 3886452961 When calling the activity directly: https://www.strava.com/api/v3/activities/3886452961?include_all_efforts=false "elapsed_time": 100335 >> the correct amount
Hello! I was wondering if there are any plans to develop an API that would allow club owners to create events. The reason I'm asking is that I find myself in a situation where I have many past events that I would like to reuse for future club events, and it would be amazing if I could automate this process. Would you happen to have any information on this topic?
It would be great to be able to add a webhook subscription directly within https://www.strava.com/settings/apiRight now the overhead of having to implement the subscription programmatically from the client means we need a one-off Strava implementation that doesn't look like any other product that offers this kind of webhook service. This is harder to support over time, and has meant we have had to rely on polling the activity endpoints more than we want to.Thanks for listening!
Hey 🙂 We have been using Strava API since 2017 and organize hundreds of local sports and eco challenges, very often with prizes, e.g. from local authorities. Credibility of the data and fraud detection is though very important. We've experienced cases when users upload manually to Strava activities which were well prepared in widely available tools - those activities have a reliable .gpx track, data about source (all sports devices) and looks like real activities. Quite often they download .gpx tracks from other Strava users and edit them (e.g. adding timestamps in any .gpx editor or editing device source) To make our events we need to somehow spot those fraudulent activities. Do you have any idea how we can recognize them? Huge thanks for help in advance! Have an active day! 🙂
Hi, I am not sure if this is the right place to ask this but I will just go ahead: I am trying to set up a webhook to strava and followed this guide. I think I made a mistake when sending the request to the push_subscriptions endpoint and did not save the response from it. Now I would like to delete the subscription as described in this article. Because I did not save the response from the first request I do not know my subscription ID. To retrieve this ID I tried to make a GET request to the push_subscriptions endpoint and view the subscription, as described in the article aswell. This however does not work and returns this errror: The request I sent to receive this errror was the following (in Python): When trying to just subscribe again, I just get the error that a subscription already exists, so I do want to delete it or at least be able to view it. I would really appreciate some help with this issue, and sorry if there is a better place to ask these kind of questions.
Hi everyone! In the getActivity api response there is only start_date and no end_date. Currently I need to know the time when the most users finish their activity. i want to know exactly total time from start to end activity (moving time, elapsed_time, pause activity time ) Thanks everyone!
Good morning,I have a question about activity upload via api.I have a TCX file built manually, thus not coming from a device like Garmin. This file contains elevation data (<AltitudeMeters>...</AltitudeMeters>).If I try to upload this activity via api (https://www.strava.com/api/v3/uploads), the activity appears among my activities (https://www.strava.com/athlete/training), but shows an elevation of 0.Using the web interface (+ >> Upload activity >> Choose file):1) before clicking Save & View, the activity appears among my activities, without elevation2) after clicking Save & View, the elevation appears and is correct.It seems like the api call stops at step 1, and the elevation is missing. Is it possible to obtain the same result (steps 1 and 2) using apis?
Strava calculates the nearest possible location of where an activity was performed. For example, if you ride your bike in a local state park, Strava is able to retrieve that information and add it next to the time and date of your activity. Is it possible to expose this information as part of the API response for an activity?The use case I have is to get the location data and stick it to the title as part of post process automation to indicate where an activity was performed.
Hey, Any Strava developers reading this forum? I've sent a request (to developers-at-strava.com) to increase the rate limit for my app (Client ID: 68556, Ticket #5526) more than two weeks ago but got no response (same on Twitter). I have ~600 users and a rate limit of 1000 requests per day is killing me (and creates a lot of user complaints).If anyone from Strava is reading this, please reach out and help me resolve the ticket. Thanks!
Hello Strava team, I hope this message finds you well. My name is Marcos and I have recently been experiencing difficulties while using the Strava API, specifically with the OAuth authentication process. The code I have been using up until now is as follows: curl -X POST https://www.strava.com/api/v3/oauth/token -d client_id=ReplaceWithClientID -d client_secret=ReplaceWithClientSecret -d grant_type=refresh_token -d refresh_token=ReplaceWithRefreshToken Unfortunately, it seems that this code is no longer working and I am having trouble obtaining the code parameter required for some requests. Furthermore, after checking the documentation page, I noticed that the information does not appear to be up-to-date. I would like to request your assistance in resolving this issue and, if possible, ask for an update to the documentation. This would be extremely helpful for me and other developers who use the Strava API. Thank you in advance for your attention and I eagerly await your guidance. Best
I would like to prevent unwanted users to auth to my application.1. Is there a way I could POST some headers/data during authorization to "https://www.strava.com/oauth/authorize" like client_id?2. The use case is that I don't want users to share auth link like: "https://www.strava.com/oauth/authorize?client_id=99999&redirect_uri=https://mysecretwebpage.org&response_type=code&scope=activity:read_all"3. I just want the users to be possible to auth to my app when clicking a link from my webpage. This would act as a protection from copy&pasting the link.Thanks.
Hi, I have an issue with Strava API. I want to get activity streams and especially cadence, watts and temp for 1 activity.Problem: with my requests below, I can only see 'temp' and not cadence and watts.header = {'Authorization': 'Bearer ' + access_token}param = {'keys': ['cadence', 'watts', 'temp'], 'key_by_type': True}time_list = requests.get(url, headers=header, params=param).json()Does it mean we are able to do only 1 key per request ? Meaning I should have to do 3 requests and not only one ? Thanks
I want to delete the primary photo associated with a Strava activity so that I can replace it with an updated version of it.I do not see any DELETE endpoints in the Strava API docs at the moment.How can I achieve this using the available Strava endpoints?
Hi there, Following the docs I've gotten to the point where I can't make any requests with the `@auth-spa-js` Auth0 client, since it default attaches `openid` to the beginning of the scope on any request. Thus, when trying to login with this client, I get a `scope invalid` message, since the scope is `openid+read` instead of `read`. It seems they aren't planning on changing this, so is there any way for openid to be an expected scope? (source of them not planning to change it: https://github.com/auth0/auth0-spa-js/issues/433)
Can the Webhook Events API be extended to include changes to other data? Currently we can only recieve a webhook for these 3 events: Title Type Privacy However other changes, like media changes (photos or videos) don't have a notification. And I'm seeing these additions after the initial activity creation quite often. The Strava mobile Application event has a separate "Add Media" context menu item but these adds are silent from the Events API perspective.
Hello, GET `activity` from the API includes `segment_efforts` array containing incorrect id values. They are all missing at least the last two digits. I just started using this recently, and it seems like this is something people would have noticed already. Is it a new change? example: url of segment effort on Strava.com: https://www.strava.com/activities/{activityId}/segments/XXXXXXXXXXXXXXXX336 what gets returned in API response: {..., segment_efforts: [{id: XXXXXXXXXXXXXXXX300, ... }], ... } note the last three digits in the URL: "336", and in the API response: "300" This is for an identical segment effort, and can be repeated for every segment effort I tested Calling API for GET segment_effort with id XXXXXXXXXXXXXXXX300 returns 404! --- also calling GET segment_effort API with the correct id returns a result with the incorrect id. --- DetailedSegmentEffort id says type is `long` https://developers.strava.com/docs/reference/#api-models-DetailedSegmentEffort Maybe this type do
I would like to develop only for myself (not for other users). Is there the concept of personal access tokens like many other APIs have for this purpose so I don't have to build the oauth flow just to get my own data? Examples of companies having this are Airtable and Github.
Hello,I'm implementing a rate-limiter library in my code to make sure I don't overpass the limits.Are the 0auth calls (made to https://www.strava.com/api/v3/oauth/token) also included in the rate limits? Thank youMarc
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.