title: Google Drive API - Queries randomly fail on TokenResponseException (Invalid Request/Internal Failure)
body: <p>I use the .NET Client Library to list all files and folders in different user drives (Files/list request).</p>
  
  <p>The application uses Google Apps Domain-Wide Delegation of Authority and correctly instantiates a Drive service object.</p>
  
  <p>Most of the time, everything works properly and the application is able to fetch the content in Google Drive. However, about one time per day, it randomly fails on an API call (Files/List) and the .NET Client Library throws a <strong>TokenRequestException</strong>.</p>
  
  <p>Here different error messages that I received on a <strong>TokenRequestException</strong>:</p>
  
  <ul>
  <li>Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"invalid_request", Description:"", Uri:""</li>
  <li>Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"internal_failure", Description:"com.google.gaia.client.GaiaRemoteException: Unexpected return code: 13 (backend says: GSS mutation failed: Maximum number of CONDITION_FAILURE (5) is reached.)", Uri:""</li>
  </ul>
  
  <p>I don't understand why the DriveService fails to make the request... it seems to be related to the token...</p>
  
  <p>Does someone know the reason? Why the DriveService throws this type of exception if it's correctly authenticated?</p>