cancel
Showing results for 
Search instead for 
Did you mean: 

invalid token exchange authorization codes?

Cyril
Mt. Kenya

So 99% of the time my token exchange process works just fine, but occasionally Strava responds with a "Bad Request" message.

I've confirmed that each authorization request is accepted, and I receive a query string formatted as expected, looking like:

"code":"012345ab6c7d89e48d7e92a0e381024deb1f0a7b",
"scope":"activity:read_all,activity:write,profile:read_all,read,read_all"

but occasionally the POST call to https://www.strava.com/oauth/token receives this response:

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

This issue is so intermittent that I can't reproduce it, but I'm sure I only try to use the short-lived code once...

Any ideas what might be going wrong? 

1 ACCEPTED SOLUTION

Elliott
Community Manager Community Manager
Community Manager

Hi Cyril, 

If you've taken all of the steps to troubleshoot what could have caused the Bad Request error and are still experiencing issues, you can always reach out to us at developers@strava.com and we can investigate the issue further and see if there's anything we can identify on our side. 

- Elliott

View solution in original post

1 REPLY 1

Elliott
Community Manager Community Manager
Community Manager

Hi Cyril, 

If you've taken all of the steps to troubleshoot what could have caused the Bad Request error and are still experiencing issues, you can always reach out to us at developers@strava.com and we can investigate the issue further and see if there's anything we can identify on our side. 

- Elliott

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings