cancel
Showing results for 
Search instead for 
Did you mean: 

'oauth/token' endpoint not working

owen7lloyd
Mt. Kenya

I am following the steps of the getting started guide: https://developers.strava.com/docs/getting-started/#oauth

I am on step 11, attempting to make an authentication request in Postman, equivalent to the one shown in the guide. When I make the request in Postman (see image below), I get a response of a Strava page saying 'Sorry, this one stays red.'

Screenshot 2024-07-12 at 11.11.22 PM.png

I also tried using the end 'api/v3/oauth/token' endpoint from this example cURL request in the authentication documentation: https://developers.strava.com/docs/authentication/#:~:text=always%20be%20%22authorization_code%22.-,... . But I ran into the error described in this post: https://communityhub.strava.com/t5/developer-discussions/api-v3-auth-error/m-p/25187 which indicates that 'api/v3/oauth/token' isn't even a valid endpoint.

What am I doing wrong?

 

1 ACCEPTED SOLUTION

Jan_Mantau
Sajama

The documentation for Token Exchange is correct in the examples with the URL https://www.strava.com/api/v3/oauth/token but wrong where it says introductory you should POST to https://www.strava.com/oauth/token. https://www.strava.com/oauth is for user interactions only, API calls must use the /api/v3 path. I believe the solution in the other thread didn't work because of the URL changes but because the poster after some tries finally provided the correct "code" that was created by the previous authorizing.

 

View solution in original post

1 REPLY 1

Jan_Mantau
Sajama

The documentation for Token Exchange is correct in the examples with the URL https://www.strava.com/api/v3/oauth/token but wrong where it says introductory you should POST to https://www.strava.com/oauth/token. https://www.strava.com/oauth is for user interactions only, API calls must use the /api/v3 path. I believe the solution in the other thread didn't work because of the URL changes but because the poster after some tries finally provided the correct "code" that was created by the previous authorizing.