Skip to main content
Solved

[SOLVED] Update access token scope or create a new access token


Forum|alt.badge.img+6

Hi all.

I have a django app that connects to Strava through oauth.

When I set the authorisation up, a while ago, I used the defaults that are detailled here , which means that the scope of my access token is read.

At that time, I did not know exactly what I would need, so it was fine.

But as my app progressed, I realised that the read scope prevented me from getting any ride data that falls under my privacy settings.

So I wanted to update the scope to read_all and to add activity:read_all also, to get all the data.

 

But I have not been successful at all at modifying the scope of my access token.

I' ve tried to create another one (including following https://developers.strava.com/docs/authentication/ ) byt when I check on my settings/api page, the scope is still read.

Strangely enough, I now have two tokens that I can use to connect, but the one with extended scope works only when I curl, not when I use django.

I have run out of ideas on how to either delete my current access token and create a new one, or to update the scope of the existing one, so any help would be appreciated.

 

Thank you.

Best answer by Eric_Greenpt

I have created a new client secret and updated my django configuration to use it, and after login in again, the access token has been updated and I have access now to all the data from my rides.

Apologies for the noise.

Thank you.

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

3 replies

Forum|alt.badge.img+6
  • Author
  • Hub Rookie
  • 6 replies
  • Answer
  • May 22, 2023

I have created a new client secret and updated my django configuration to use it, and after login in again, the access token has been updated and I have access now to all the data from my rides.

Apologies for the noise.

Thank you.


Jan_Mantau
Superuser
Forum|alt.badge.img+26
  • Superuser
  • 895 replies
  • May 22, 2023

The token on the settings/api page is only for testing basic features (reading your own athlete stats). It doesn't have a use for a real app and the scope can't be extended. You have to use the second token you have generated and refresh that from time to time. Though as I don't know anything about django I can't help with using and refreshing the good token there.


Forum|alt.badge.img+6
  • Author
  • Hub Rookie
  • 6 replies
  • May 22, 2023

Hi @Jan_Mantau Thanks for the explanation of the use of the default token.

As I mentionned in a comment that I likely posted at the same time as yours, I managed to get a token with the proper scope and access to all the data I need.

Thanks for your help.

 


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