The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
07-06-2023 06:40 PM
Hi! I have been trying to set up an API that will extract activity data based on dates.
06-29-2024 05:16 AM
It sounds like you're encountering issues with the Strava API authorization process. The 404 error at step 11 typically indicates that the URL you're using is incorrect or that there's an issue with the API endpoint you're trying to access. Let's go through the steps to ensure everything is set up correctly.
Create a Strava Application
Get Client ID and Client Secret
Authorization URL
https://www.strava.com/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=YOUR_REDIRECT_URI&approval_prompt=force&scope=read,activity:read
User Authorization
Exchange Authorization Code for Access Token
07-10-2023 12:01 PM
For Step 6, the checkboxes shown will vary based on the scopes you request. I believe since the original documentation was written Strava has added additional scopes so the screenshot no longer matches the URL. Scopes are listed @ https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess. To get an equivalent set of checkboxes to the image you would need read and activity:read, so your URL would be:
http://www.strava.com/oauth/authorize?client_id=[REPLACE_WITH_YOUR_CLIENT_ID]&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=activity%3Aread%2Cread
As to the 404 error, I'm not sure what to tell you on that one. I just tested it locally with postman and it worked fine for me. In case it helps, the exact steps I followed:
One other thought, although I don't think it matters for this step, is to edit your app (in Strava) to have its Authorization Callback Domain set to localhost.
Welcome to the Community - here is your guide to help you get started!