cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Upcoming Forum Upgrade – New Experience Launching Soon!

Here’s what you need to know about the changes, including upcoming read-only time starting October 14: Find out more

Testing Strava Application Locally

pcybriwsky
Mt. Kenya

I've seen that you're unable to have multiple sub-domains authorized for a callback URL on the application, but what about for testing locally?

I'd love to test version my application on localhost but unfortunately it looks like I have to have an entirely separate application for it and wondering if that is anyway by-passable for local testing. Thank you!

1 REPLY 1

ActivityFix
Superuser
Superuser

You can provide a redirect URI as an argument to the oauth authorize call and it will use whatever you provide. Once you have a valid token the API calls don't have any check on the domain so you can run code from localhost or your server.

The only other restriction with localhost is that you won't get any webhook calls. You will need to use cURL or some equivalent to generate webhook calls targeting your localhost environment.

Edit: It's also possible that there's a special case for the redirect_uri being localhost. Either way, I test on localhost all the time without a problem and without needing to change the registered callback URL registered with Strava.