Skip to main content
Answer

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

  • November 16, 2023
  • 1 reply
  • 46 views

Forum|alt.badge.img

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?

Best answer by SkippyVasquez

Hi nemanjaCoder,

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

 

1 reply

SkippyVasquez
Strava
Forum|alt.badge.img+21

Hi nemanjaCoder,

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