refresh_token

rico

At each call i store the refresh_token. It works fine for few days. But sometimes the refresh_token will be invalid, so i have to generate a new one in myApps.

Why is the refresh_token invalid after a unknowed time (few days) ?

 

0

Comments

6 comments

  • Comment author
    Leslie Community moderator

    Hi Rico,

    The refresh_token doesn't have an expiration date. It will always remain valid even if you use it several days later. Are you sure you don't have any routine sending a request to the /token endpoint that invalidates the tokens ? 

    You can also try - if you don't already do it - to refresh the access_token a bit before the 10800 seconds expiration to see if it can help 

    Have a good day,

    Leslie - Community Manager

    0
  • Comment author
    rico

    Thank you, Leslie, so i have to review the code.

    Perhaps there is a bug  while saveing the refresh_token.

    i will see it...

     

    0
  • Comment author
    sebastien

    Absolutely the same problem for me. Was working for many months and now the refresh_token expires after the first use. All my apps are down.

    0
  • Comment author
    Leslie Community moderator

    @sebastien, 

    For me, the most logical reason is that a request to /token endpoint is sent meanwhile, invalidating the former values but not correctly caught in your code. As said previously this refresh_token value will always remain valid unless a new call to /token endpoint is done

    Have a good day,

    Leslie - Community Manager

    0
  • Comment author
    rico

    I have revised the code.

    So i dont call a new token with the refresh_token.

    Only if the token expired (check return value) i get a new token and refresh_token.

    Now it works fine, yet.

    Best regards, Rico

    0
  • Comment author
    sebastien

    I checked another thread on that forum and yes, you switched to oAuth 2.0 strict mode without even noticing dev, so you arranged our connection settings to get it works. At the same time, there was an issue regarding the token expiration that has been fixed now. 

    0

Please sign in to leave a comment.