Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Refresh tokens only last an hour. Why?

ANSWERED

I understand that refresh tokens only last an hour, however why is this the case? I only want to do 2-3 requests every day however the current API would require me spamming it every hour to make sure the refresh token doesn't expire. The code is also running on a raspberry pi, so if it dies for an hour, i'd have to re-authenticate 😕

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Access tokens via the Authorization Code Grant Flow only last one hour. However, the refresh tokens do not expire until they've been used (or the user goes through the authorization process again). If you're getting an error about the refresh token being invalid, then your application has used it. Be sure to save the new refresh token when you get a new access token with the refresh token flow.

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

Access tokens via the Authorization Code Grant Flow only last one hour. However, the refresh tokens do not expire until they've been used (or the user goes through the authorization process again). If you're getting an error about the refresh token being invalid, then your application has used it. Be sure to save the new refresh token when you get a new access token with the refresh token flow.

Best Answer
0 Votes