cancel
Showing results for 
Search instead for 
Did you mean: 

Error getting access token and refresh token

sheldongwenneg
Mt. Kenya

I'm following this tutorial here, and the step at https://www.youtube.com/watch?v=sgscChKfGyg&list=PLO6KswO64zVvcRyk0G0MAzh5oKMLb6rTW&index=1 doesn't work for me. Specifically, it's the step where we have a "code" read:all access and we exchange it for an an access token and a refresh token by sending a request of the form

https://www.strava.com/oauth/token?client_id=ID&client_secret=SECRET&code=CODE&grant_type=authorizat...

when I do this with my value of ID, SECRET, and CODE I get a page that just says "{"message":"error"}" or I get the 404 page with the red traffic light (I've tried it several times with a few variations on the scope I'm requesting).

1 REPLY 1

ActivityFix
Mount Logan

When you do the step to exchange the code for an access token, are you using Postman or cURL to generate a POST request? If you're using Postman make sure you change the request type to POST since it defaults to GET. If you're using cURL make sure you have -X POST

https://developers.strava.com/docs/getting-started/#oauth