Forums

redirect to username.pythonanywhere.com

Hi all,

I wrote a little app that authenticates to another website via a GET call with a redirect uri. It works fine on my PC redirecting to localhost, but when I try to redirect to my-username.pythonanywhere.com I get a 400 (bad request) error. Is there something else I need to do to allow my pythonanywhere app to be redirected to?

Thanks!

Scott

From a quick look at your site and the docs for Strava, I think your problem is that you have not set the callback domain for your app on Strava:

redirect_uri:   string required
URL to which the user will be redirected with the authorization code, must be to the callback domain associated with the application, or its sub-domain, localhost and 127.0.0.1 are white-listed

Note that localhost and 127.0.0.1 are whitelisted by Strava already.

Ah, I see! I was able to get Strava to whitelist my Pythonanywhere domain. Thanks!

May I also get Strava (www.strava.com) whitelisted within Pythonanywhere? I'd appreciate it.

Scott

Cool. That's whitelisted.