Showing results for 
Search instead for 
Did you mean: 

Authorization code not valid when using mine domain, working for localhost

Mt. Kenya

Hi all,

I've developed some app and while I was in development I had localhost as callback url, everything worked. Today I've deployed app on VPS on digitalocean droplet, I've bought domain and I am managing it through cloudflare (so I have https). When I try to to login to strava from my app which is deployed on that domain, I am redirected where I need to be redirected but when I take code that I got in redirect and try to get access token, I get an error:

"message": "Bad Request",
"errors": [
"resource": "AuthorizationCode",
"field": "code",
"code": "invalid"
If I set localhost for callback and get code that way and then try to get access token from postman, it works.
In my settings I have my domain configured as callback domain.
Can someone help?

Moderator Moderator

Hi nemanjaCoder,

I would take a look at our authentication documentation, which you can find here.


STRAVA | Developer Hub Team