title: C# Desktop application. Simple example how to upload a file to Google Drive
body: <p>Is there any code example of a desktop application how to authorize to Google Drive service and upload a file?</p>
  
  <p>Currently I have:</p>
  
  <pre><code>var parameters = new OAuth2Parameters
                                   {
                                       ClientId = ClientCredentials.ClientId,
                                       ClientSecret = ClientCredentials.ClientSecret,
                                       RedirectUri = ClientCredentials.RedirectUris[0],
                                       Scope = ClientCredentials.GetScopes()
                                   };    
  string url = OAuthUtil.CreateOAuth2AuthorizationUrl(parameters);
      // Open url, click to allow and copy secret code
      parameters.AccessCode = secretCodeFromBrowser;
      OAuthUtil.GetAccessToken(parameters);
      string accessToken = parameters.AccessToken;
      // So, there is the access token
  </code></pre>
  
  <p>But what are the next steps? As I see from examples I should get IAuthenticator instance and pass it into constructor of DriveService class... How to get an instance of IAuthenticator? If my above code is correct...
  Thanks in advance.</p>