title: GoogleSignIn ApiException: 10
body: <p>I'm using google auth in my app but I can't get it to work. My currently error is </p>
  
  <blockquote>
    <p>com.google.android.gms.common.api.ApiException: 10: 
            at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source)
            at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)
            at br.com.etc.login.LoginActivity.onActivityResult(LoginActivity.kt:123)</p>
  </blockquote>
  
  <p>My LoginActivity:</p>
  
  <pre><code>class LoginActivity : AppCompatActivity() {
      private var googleSignInClient: GoogleSignInClient? = null
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_login)
  
          val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
              .requestEmail()
              .requestIdToken(getString(R.string.google_client_id))
              .build()
  
          googleSignInClient = GoogleSignIn.getClient(this, gso)
  
           bt_login_google.onClick {
              val signInIntent = googleSignInClient!!.signInIntent
              startActivityForResult(signInIntent, RC_SIGN_IN)
          }
       }
  
      override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
          super.onActivityResult(requestCode, resultCode, data)
          if (requestCode == RC_SIGN_IN) {
              val task = GoogleSignIn.getSignedInAccountFromIntent(data)
              handleSignInResult(task)
          } 
      }
  
      private fun handleSignInResult(completedTask: Task&lt;GoogleSignInAccount&gt;) {
          try {
              val account = completedTask.getResult(ApiException::class.java)
              vm.loginGoogle(account?.idToken ?: "")
          } catch (e: ApiException) {
              Snackbar.make((findViewById(android.R.id.content)), R.string.error_generic, Snackbar.LENGTH_SHORT)
                  .show()
              Timber.e(e)
          }
      }
  }
  </code></pre>
  
  <p>I'm getting my SHA1 doing from Gradle>App>tasks>android>signinReport
  <a href="https://i.stack.imgur.com/lxlFU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxlFU.png" alt="Android Studio, Gradle Menu"></a></p>
  
  <p>I added my SHA1 to <a href="https://console.developers.google.com/apis/credentials" rel="nofollow noreferrer">https://console.developers.google.com/apis/credentials</a> now looks like this:
  <a href="https://i.stack.imgur.com/YJIFl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YJIFl.png" alt="Google Console Panel"></a></p>
  
  <p>My (R.string.google_client_id) is the Client ID </p>
  
  <p>So I went to my firebase project (I'm only using for the analytics), went to project settings and added the SHA1. I also added a support email.
  I downloaded the google-settings.json and added to my project. 
  IDk if it's important but my app is not published, I don't have a google developer account. </p>
  
  <p>I know this is a common question but I tried everything I could think of and I'm still having stuck with this problem. </p>