title: Not able to get Auth Token using GoogleAuthUtil.getToken
body: <p>I am trying to get Auth Token on Android which can be exchanged for accessToken and RefreshToken on my webserver. 
  I am following <a href="https://developers.google.com/identity/protocols/CrossClientAuth" rel="nofollow noreferrer">this documentation</a>.<br>
  Specifically the section - Android app obtains offline access for web back-end</p>
  
  <p>My code: </p>
  
  <pre><code>String WEB_APP_CLIENT_ID = "***.apps.googleusercontent.com";
  String scopes = "oauth2:server:client_id:" + WEB_APP_CLIENT_ID+":api_scope:" + Scopes.PLUS_LOGIN + " https://www.googleapis.com/auth/plus.profile.emails.read";
  //String this_scope_works_but_gives_access_token = "oauth2:" + Scopes.PLUS_LOGIN + " https://www.googleapis.com/auth/plus.profile.emails.read";
  try {
      String authToken = GoogleAuthUtil.getToken(AttachEmailActivity.this, account,scopes);
  } catch (GoogleAuthException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>But it's always giving me following exception:</p>
  
  <pre><code>com.google.android.gms.auth.GoogleAuthException: Unknown
  com.google.android.gms.auth.GoogleAuthUtil.zza(Unknown Source)
  com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
  com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
  com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
  app.activities.AttachEmailActivity$1.run(AttachEmailActivity.java:437)
  </code></pre>
  
  <p>I have read and tried out almost all solutions on similar problems it is still failing. I have tried using all different client IDs - including web client id, server application id, android client id, other client id</p>
  
  <p>In fact, I used rest API outside my JAVA application using the same web client ID and I was able to get the required auth code.</p>
  
  <p><a href="https://accounts.google.com/o/oauth2/auth?response_type=code&amp;client_id=" rel="nofollow noreferrer">https://accounts.google.com/o/oauth2/auth?response_type=code&amp;client_id=</a>****.apps.googleusercontent.com&amp;redirect_uri=<a href="http://localhost&amp;scope=https://www.googleapis.com/auth/plus.login&amp;access_type=offline" rel="nofollow noreferrer">http://localhost&amp;scope=https://www.googleapis.com/auth/plus.login&amp;access_type=offline</a></p>
  
  <p>But in Java application, I am only getting the "Unknown" exception.
  Can't google give more information? What's unknown? Is there a way to get the com.google.android.gms.auth package code and see where the exception is being thrown from?</p>
  
  <p><a href="https://i.stack.imgur.com/4MhOc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4MhOc.png" alt="Here is the view of credentials dashboard"></a></p>