title: How to get an access token using a refresh token in Java?
body: <p>I am currently implementing <code>Contact Application</code> using <code>Google Contact API</code> in <code>Java</code>. I have completed steps of authorization and obtained an <em>access token</em> and a <em>refresh token</em>.</p>
  
  <p>Now I have the <code>CLIENT_ID , CLIENT_SECRET AND REFRESH_TOKEN</code> with me . But the <em>access token</em> is getting expired within an hour. </p>
  
  <p>Can someone tell how to automatically generate an <em>access token</em> using a <em>refresh token</em> in Java?</p>