title: Google Drive API Authentication
body: <p>I'd like to make an application that could access MY own Google Drive anytime, create files there, share them and so on.
  According to <a href="https://developers.google.com/drive/service-accounts">https://developers.google.com/drive/service-accounts</a> "Use regular Google accounts as application-owned accounts" the only think I need is to get access_token and refresh_token once, store them in my application and using refresh_token I can refresh my access_token (somehow).</p>
  
  <p>I can get access_token using request something like
  <a href="https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.file&amp;redirect_uri=http://localhost;response_type=token&amp;client_id=">https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.file&amp;redirect_uri=http://localhost;response_type=token&amp;client_id=</a></p>
  
  <p>After approve this application request in user dialog I will be redirected to my localhost and I will get access_token that expires in 3600 seconds.</p>
  
  <p><strong>The questions are:</strong></p>
  
  <p><strong>1. How to get a refresh_token?<br>
   2. How to refresh access_token using refresh_token?</strong></p>
  
  <p>I don't want to use Google's API client library because it's terrible (.NET).</p>