title: How can I get this Google Login ID Token from this Android app to verify server-side?
body: <p>I'm getting the ID Token in my Android app by initiating like this:</p>
  
  <pre><code>GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                  .requestIdToken(getString(R.string.server_client_id))
                  .requestEmail()
                  .build();
  </code></pre>
  
  <p>Where <code>server_client_id</code> is my SERVER's Oauth Client ID. Then later I request the token with <code>googleAccount.getIdToken()</code></p>
  
  <p>Then on my server (PHP), when I verify the token I verify it like this:</p>
  
  <pre><code>$client = new \Google_Client(['client_id' =&gt; getenv("GOOGLE_CLIENT_ID")]);
      try {
          $payload = $client-&gt;verifyIdToken($this-&gt;idToken);
      } catch (\Exception $e){
          throw new BadRequestHttpException($e-&gt;getMessage());
      }
      if($payload){
          $this-&gt;verifyPayload($payload);
      } else {
          throw new AccessDeniedHttpException("Invalid ID Token");
      }
  </code></pre>
  
  <p>Where <code>GOOGLE_CLIENT_ID</code> is my ANDROID's Oauth Client ID</p>
  
  <p>I'm following this guide: <a href="https://developers.google.com/identity/sign-in/android/start-integrating" rel="noreferrer">https://developers.google.com/identity/sign-in/android/start-integrating</a>.</p>
  
  <p>On this page it says: <a href="https://developers.google.com/identity/sign-in/android/backend-auth" rel="noreferrer">https://developers.google.com/identity/sign-in/android/backend-auth</a></p>
  
  <blockquote>
    <p>When you configure Google Sign-in, call the requestIdToken method and pass it your server's web client ID.</p>
  </blockquote>
  
  <p>Hence why I'm using the <code>server_client_id</code> in my Android app. Is this correct?</p>
  
  <blockquote>
    <p>// Specify the CLIENT_ID of the app that accesses the backend</p>
  </blockquote>
  
  <p>And this is why I'm using the ANDROID client ID from my server.</p>
  
  <p>Is this right? To be using each other's Oauth client_id's? Or should they both be using the Android CLIENT_ID? </p>
  
  <p>Thanks in advance</p>