02-22-2016 01:51
02-22-2016 01:51
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 😕
Answered! Go to the Best Answer.
02-22-2016 10:05
02-22-2016 10:05
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.
02-22-2016 10:05
02-22-2016 10:05
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.