Skip to main content

Hello. 

I created app. According to the instructions, I filled it out for testing to Swagger Playground. 

But when I try to log in, I get an error in the response:

{
"message": "Bad Request",
"errors": [
{
"resource": "Application",
"field": "redirect_uri",
"code": "invalid"
}
]
}

request url:

https://www.strava.com/api/v3/oauth/authorize?response_type=code&client_id=117684&redirect_uri=https%3A%2F%2Fdevelopers.strava.com%2Foauth2-redirect%2F&scope=read&state=U3VuIERlYyAwMyAyMDIzIDIxOjA3OjQzIEdNVCswNzAwICjQndC%2B0LLQvtGB0LjQsdC40YDRgdC6LCDRgdGC0LDQvdC00LDRgNGC0L3QvtC1INCy0YDQtdC80Y8p

What am I doing wrong?

Hey miv,


Thanks for the post. Can you tell me if you are still experiencing this issue?


 


Hello @SkippyVasquez,

Unfortunately, the issue is still there. I guess I could discover the reason;

  • Go to page: Swagger UI
  • Use the “Authorize” button at top-right
  • Then the “Available authorizations” modal box opens.
  • Fill-in Client_id and Client_secret
  • If you select multiple “scopes” at the bottom, you’ll see that the selected scope options are merged by “space” in the URL and not by comma as suggested.

SAMPLE:

https://www.strava.com/api/v3/oauth/authorize?response_type=code&client_id=******&redirect_uri=https%3A%2F%2Fdevelopers.strava.com%2Foauth2-redirect%2F&scope=profile%3Aread_all%20activity%3Aread_all&...

 

Hope this helps. And hope you can fix is fast 🙂.

Merry Christmas….

 


@selimy, Thank you.  I had the same issue yesterday on the Swagger UI site (https://developers.strava.com/playground/). 

 

I had clicked on the unlocked “Authorize” button and selected two scopes.  I replaced the “%20” (space) with a “,” and it allowed my user to be Authorized successfully (the lock icon closed).

 

If I recall, this workaround was not necessary when I used the site a few months ago.


HI ​@miv - just in case you are still seeing this error, but more likely in case anyone stumbles upon this thread because they hit this error, 

There is a somewhat fine print key step at the top of the Swagger Playground:

To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com.

Note, this is only required if you want to authorize in the Swagger Playground, and you would want to switch it back to your own callback domain when done testing in Swagger.

Note also, I also found there still to be an issue when selecting more than one scope as ​@selimy pointed out above.


Reply