Skip to main content
Solved

'oauth/token' endpoint not working

  • July 13, 2024
  • 1 reply
  • 67 views

Forum|alt.badge.img

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.'

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.-,Example%20cURL%20Request,-curl%20%2DX%20POST . 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?

 

Best answer by Jan_Mantau

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 original
Did this topic help you find an answer to your question?

1 reply

Jan_Mantau
Superuser
Forum|alt.badge.img+26
  • Superuser
  • 895 replies
  • Answer
  • July 13, 2024

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.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings