title: Google Play Game Services - unable to sign in
body: <p>Right after yesterday's Google I/O keynote I've updated my Android SDK to integrate the game services into one of my apps.</p>
  
  <p>Things I've done so far:</p>
  
  <ol>
  <li>added and linked my app in the Dev Console (game services)</li>
  <li>included the OAuth client id into my app/manifest</li>
  <li>added <code>BaseGameActivity</code> and <code>GameHelper</code> to my project (<a href="https://github.com/playgameservices/android-samples/blob/master/BaseGameUtils" rel="nofollow noreferrer">from GitHub</a>)</li>
  <li>added the google-play-services library to my project</li>
  <li>extended <code>BaseGameActivity</code>, added a <code>com.google.android.gms.common.SignInButton</code></li>
  </ol>
  
  <p>I've also set up game meta data and, of course, some achievements. The dev console states that it is ready to release. To test the login flow and achievements, I've added two Google+ accounts as test users.</p>
  
  <p>But when I test the SignInButton, an alert pops up: <em>Unknown error</em>. Here's the logcat:</p>
  
  <pre><code>ERROR/Volley: il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
  ERROR/SignInIntentService: Access Not Configured
  ERROR/LoadSelfFragment: Unable to sign in - application does not have a registered client ID
  </code></pre>
  
  <p>I've built my application in production mode - using ProGuard and the right certificate.</p>
  
  <p>Did I miss something?</p>
  
  <h3>Update - some more attempts</h3>
  
  <p>Here's a short overview about what I've tried in the meantime. Nothing helped.</p>
  
  <ul>
  <li>remove and recreate the linked Android app entry (double checked certificate fingerprint)</li>
  <li>disable anti-piracy</li>
  <li>skip proguard</li>
  <li>create a new (test) game and use its client id</li>
  </ul>
  
  <p>The problem is not related to the <em>accounts for testing</em> section. Using an account which is not enabled for testing will lead to another error message:</p>
  
  <pre><code>E/GameAgent: Unable to retrieve 1P application 547xxxxxx457 from network
  E/CheckGameplayAcl: Unable to load metadata for game
  </code></pre>
  
  <h2>Solution by Hartok!</h2>
  
  <p>Hartok's solution helped me a lot to fix this issue. I've never visited the <a href="https://code.google.com/apis/console/" rel="nofollow noreferrer">Google APIs Console</a> before. It's important to know, that the OAuth Client ID is not deleted when you remove a linked app from your game or even delete a game (in the Dev Console). You have to visit the APIs Console and remove it manually.</p>
  
  <p>The auto-selected SHA1 fingerprint is (always) wrong! You have to lookup your own:</p>
  
  <pre><code>keytool -exportcert -alias &lt;your-alias&gt; -keystore &lt;path-to-keystore&gt; -list -v
  </code></pre>
  
  <p>The new client id of my (correctly) linked app looked like <code>89xxxxxxxx73-2u6mXXXXXXXXXXXXXXXXXXX8903.apps.goo...</code>, not just 12 digits as before. I finally figured out that you have to exclude the dash and alphanumeric stuff and have to use the 12 digits only.</p>