Skip to main content

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?   

 

 

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/


@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?


Exactly


Reply