title: UNREGISTERED_ON_API_CONSOLE while getting OAuth2 token on Android
body: <p>We're under Android (Jellybean and higher), and we've got an app which need to use OAuth2 with Google for authentication.</p>
  
  <p>I simplified the login activity, but it's looking like that:</p>
  
  <pre><code>AccountManager mAccountManager;
  // [...]
  Account account = new Account("myEmail@gmail.com", "com.google");
  // same with professional email managed by Google as myEmail@myDomain.com
  // real code recovers accounts with mAccountManager.getAccountsByType("com.google")
  mAccountManager = AccountManager.get(getBaseContext());
  mAccountManager.getAuthToken(account, "oauth2:https://www.googleapis.com/auth/userinfo.email", null, MyActivity.this, new AccountManagerCallback&lt;Bundle&gt;() {
      @Override
      public void run(AccountManagerFuture&lt;Bundle&gt; accountManagerFuture) {
          try {
              String token = accountManagerFuture.getResult().getString(AccountManager.KEY_AUTHTOKEN);
              // exception occurs here
              // [...]
          } catch (Exception e) {
              Log.e("account", "exception occurs", e);
          }
      }
  }, null);
  </code></pre>
  
  <p>When we call <code>accountManagerFuture.getResult()</code>, it fires this exception:</p>
  
  <pre><code>android.accounts.AuthenticatorException: UNREGISTERED_ON_API_CONSOLE
      at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2024)
      at android.accounts.AccountManager.access$400(AccountManager.java:144)
      at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1867)
      at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
      at android.os.Binder.execTransact(Binder.java:446)
  </code></pre>
  
  <p>I cannot find neither doc about this nor other people with the same exception, and I'm quite confused: the call to <code>AccountManager.getAuthToken</code> only provides an account (name and type), a scope, and a callback method, there's no parameter to specify an app or something I could customize in the dev API console.</p>
  
  <p>I'm sure I'm missing something, but what?</p>