title: How many times can I use a refresh token obtained from google api
body: <p>I have developed a rails application that allows a user to login using their google account and then the application fetches the emails and parses them for information.</p>
  
  <p>All this works fine, but I am facing issues with access token become invalid, hence I have been looking into refreshing the token. I found some code at:
  <a href="https://stackoverflow.com/a/14491560/718087">https://stackoverflow.com/a/14491560/718087</a></p>
  
  <p>With this code I have been able to get a new access token that works. But I have a few questions:</p>
  
  <ol>
  <li><p>How many times can I use the same refresh token I got the first time? or do I need update my refresh token as well, each time I get a new access token? note: application is setup with offline access.</p></li>
  <li><p>Do I need to refresh the token before it expires or it will still return to me a valid token after the old access token has expired? This will allow me to decide an approach as to when I should refresh the tokens - a: right before fetching the emails, b: automatically before the token expires via delayed jobs or something (this would add quite a overhead though)</p></li>
  </ol>
  
  <p>I have gone through the api docs but could not find answer to my these specific questions. Please excuse my overly detailed queries.</p>
  
  <p>Thanks,
  Aditya</p>