Strava API and CORS

431 views
Skip to first unread message

James Randall

unread,
Nov 4, 2016, 8:32:30 AM11/4/16
to Strava API
If you're trying to access Strava from a JavaScript client I've created a tiny CORS enabled pass through proxy for the API that also supports the token exchange used in their OAuth process. You can find it on GitHub here:


Hopefully useful to somebody.

Ross Neilson

unread,
Jan 19, 2017, 6:32:24 AM1/19/17
to Strava API
Thanks James this looks useful. Do you know if there is any way of authenticating using just JavaScript running in the browser? I'm trying to develop a small web page that works without server-side components.

It seems as though the POST you have to do to swap the temporary token for the access token doesn't work from the browser, although I might be doing it wrong.

Julien Silland

unread,
Jan 23, 2017, 3:18:38 PM1/23/17
to Ross Neilson, Strava API
Ross,

you are correct that our CORS setup doesn't currently cover the OAuth token request and exchange. We have an outstanding bug tracking this issue internally, I will update this thread when it gets resolved.

Thanks,
-j

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Move at a regular pace and fix things
STRAVA

Gabe O'Leary

unread,
Jan 26, 2017, 2:47:11 AM1/26/17
to Strava API
Thanks a ton James! Without this, I would be unable to continue my project.

Pretty hard to believe that it's not possible to use this API without setting up your own server endpoint...

-Gabe
Reply all
Reply to author
Forward
0 new messages