Strava API Playground questions

1,805 views
Skip to first unread message

Michael Nebelsick

unread,
Sep 25, 2017, 10:03:54 PM9/25/17
to Strava API
So I've entered my client_ID and client_secret (obtained from "My API Application" page) into the Swagger authorization screen, and select one or several of the scopes, but always get back the following error:

 {"message":"Bad Request","errors":[{"resource":"Authorize","field":"scope","code":"invalid"}]}

what could I be doing wrong, or what am I missing... seems this should work.

Jan Willem Fransen

unread,
Oct 13, 2017, 2:49:16 PM10/13/17
to Strava API
Hello,

I do notice the same behavious, wander if I'm missing something obvious. I do have a cllient-id and client-secret I fill in .. and then same as below.

Some pointers would be terrible helpfull ;-)

--jw


Op dinsdag 26 september 2017 04:03:54 UTC+2 schreef Michael Nebelsick:

Jan Willem Fransen

unread,
Oct 13, 2017, 3:30:11 PM10/13/17
to Strava API


To answer my own question .. filling in right website/callbackdomain in the app did the trick




Op vrijdag 13 oktober 2017 20:49:16 UTC+2 schreef Jan Willem Fransen:

Michael Nebelsick

unread,
Oct 13, 2017, 8:28:29 PM10/13/17
to Strava API
Thank you for the answer!  I finally got it to work too, but want to mention one other thing that may trip people up...  seems you can only select one of the scopes at a time (they should have used radio buttons instead of checkboxes if that is indeed the case).  Anyway, if I selected any 2 or all 3 scopes, I would still get the same error, but with Jan Willem's answer and only selecting one scope things work as expected.

Mike

Simon Vane

unread,
Oct 14, 2017, 1:52:49 AM10/14/17
to Strava API
Thank you so much for posting the answer. I had the save problem.

Vojta Ripa

unread,
Oct 9, 2019, 9:54:42 PM10/9/19
to Strava API
Wow thanks guys!!
1. had to set the website settings to dev tools..
2. could only select one option in Playground... agreed its confusing that you can only select one options and not multiple or else it will keep failing.

Waseem Hassain

unread,
Oct 11, 2019, 12:28:52 AM10/11/19
to Strava API


Hey I have been having the same issue and I tried changing the redirect url on the settings page and also change the scope to one value, but still no luck. What was the redirect URI that you included when creating the oauth url? In my case I have a stg and live platform so its necessary that my redirect uri in my code includes the subdomain stg.

Take a look:
Screen Shot 2019-10-11 at 12.23.40 AM.png
In my code in order to create the oauth url I have it like this:

params = {
 
'client_id': self.strava_client_id,
 
'redirect_uri': 'https://stg.sixcycle.com/api/v3/strava/complete/?user_id={}'.format(self.user.id),
 
'response_type': 'code',
 
'approval_prompt': 'auto',
 
'scope': 'read'
}
url_params
= urllib.urlencode(params)

url
= 'https://www.strava.com/oauth/authorize/?' + url_params

Any guidance or help would be appreciated!
Reply all
Reply to author
Forward
0 new messages