title: OAuth2ErrorException invalid_token when verifying token on GoogleAuthUtil.getToken() Google+ on server
body: <p>First time using the Google+ API. I have an application with a web and Android client that uses G+ for authentication. Web client is working nicely. I have a "Client ID for web application" set up in the Google API console, which I use to fetch a token with a javascript client.</p>
  
  <p>The javascript client uses the following button (taken basically verbatim from a Google demo app):</p>
  
  <blockquote>
  <pre><code>&lt;button class="g-signin"
         data-scope="https://www.googleapis.com/auth/plus.login"
         data-requestvisibleactions="http://schemas.google.com/AddActivity"
         data-clientId="my_web_application_client_id"
         data-callback="onSignInCallback"
         data-theme="dark"
         data-cookiepolicy="single_host_origin"&gt;
  </code></pre>
  </blockquote>
  
  <p>I verify on the Python server with:</p>
  
  <blockquote>
  <pre><code>url = ('https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=%s' % token)
   h = httplib2.Http()
    result = json.loads(h.request(url, 'GET')[1])
  </code></pre>
  </blockquote>
  
  <p>So far so good. Token verifies as expected.</p>
  
  <p>Now for the android app... I set up a "Client ID for android application" for the same project with a debug fingerprint generated by:
  keytool -exportcert -alias androiddebugkey -keystore debug.keystore -list -v</p>
  
  <p>The package for the client id name matches what's in my Android manifest.</p>
  
  <p>I'm using GoogleAuthUtil to generate a token in my Android app:</p>
  
  <pre><code>String token =
    GoogleAuthUtil.getToken(
      this,
      "selected@email.address",
      "oauth2:server:client_id:&lt;client_id&gt;:" +
        "api_scope:https://www.googleapis.com/auth/plus.login");
  </code></pre>
  
  <p>If I use my my newly-created android app client id, I get:
  GoogleAuthException: com.google.android.gms.auth.GoogleAuthException: Unknown</p>
  
  <p>I haven't figured that one out yet, but some solutions hint that I should just be using the web application client id and that the Exception is working as intended.</p>
  
  <p>If I use my web application client id, then everything appears to work just fine and a token is returned, but when I send the token to my server to verify, the token gets rejected:</p>
  
  <pre><code>{u'error_description': u'Invalid Value', u'debug_info': u'code: INVALID_VALUE
  http status: 400
  arguments: [invalid_token]
  cause: com.google.security.lso.protocol.oauth2.common.OAuth2ErrorException:\
   invalid_token at
  com.google.security.lso.grant.token.TokenManager.getTokenInfo(TokenManager.java:603) at
  com.google.security.lso.apiary.tokeninfo.TokenInfoAction.execute(TokenInfoAction.java:92)
  </code></pre>
  
  <p>I've verified the token arriving at the server is the same one that is fetched in the app (no stray whitespace, etc).</p>
  
  <p>Any ideas what I'm doing wrong? Thanks for any suggestions!</p>