Skip to main content
Solved

Beginner question: How to get Activity:write permissions ?


Forum|alt.badge.img+1

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?   

 

 

Best answer by Jan_Mantau

When requesting the bearer token with your client id and secret you have to list all the permissions you want to have in the “scope” parameter of the URL, in this case at least activity:write. As this is your own account you want to access it would be normal to request all the other possible permissions too, together that would lead to scope=read_all,profile:read_all,activity:read_all,activity:write

 It’s all outlined in https://developers.strava.com/docs/authentication/

View original
Did this topic help you find an answer to your question?

3 replies

Jan_Mantau
Superuser
Forum|alt.badge.img+26
  • Superuser
  • 901 replies
  • Answer
  • March 18, 2025

When requesting the bearer token with your client id and secret you have to list all the permissions you want to have in the “scope” parameter of the URL, in this case at least activity:write. As this is your own account you want to access it would be normal to request all the other possible permissions too, together that would lead to scope=read_all,profile:read_all,activity:read_all,activity:write

 It’s all outlined in https://developers.strava.com/docs/authentication/


Forum|alt.badge.img+1

@Jan_Mantau  If I understand you correctly, all I have to do when requesting the access_token is passing in a scope parameter with all the permissions I want on my own account?  Is it that easy?


Jan_Mantau
Superuser
Forum|alt.badge.img+26
  • Superuser
  • 901 replies
  • March 20, 2025

Exactly


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings