The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
05-21-2023 11:47 PM - edited 05-22-2023 12:17 AM
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.
Solved! Go to Solution.
05-22-2023 12:16 AM
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.
05-22-2023 12:17 AM
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.
05-22-2023 01:40 AM
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.
05-22-2023 12:16 AM
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.
Welcome to the Community - here is your guide to help you get started!