title: Retrieve Google Access Token after authenticated using Firebase Authentication
body: <p>I am trying to retrieve Google Access Token to access Google REST API such as <a href="https://developers.google.com/youtube/v3/" rel="noreferrer">YouTube Data API</a> from an authenticated user (using Firebase Authentication).</p>
  
  <p>I have successfully integrated Google Sign-In in my app with the help of <a href="https://github.com/firebase/FirebaseUI-Android/tree/master/auth" rel="noreferrer">Firebase-UI for Android - Auth</a> library. The token retrieved from <code>FirebaseUser.getToken()</code> method is not a valid Google Access Token for REST API.</p>
  
  <pre><code>user.getToken(true).addOnCompleteListener(new OnCompleteListener&lt;GetTokenResult&gt;() {
      public void onComplete(@NonNull Task&lt;GetTokenResult&gt; task) {
          if (task.isSuccessful()) {
              String token = task.getResult().getToken();
              // 'token' is not a Google Access Token
          }
      }
  });
  </code></pre>
  
  <p>In <a href="https://firebase.google.com/docs/auth/web/google-signin#redirect-mode" rel="noreferrer">Google Sign-In for Web guide</a>, it's possible to get the access token by calling <code>var token = result.credential.accessToken;</code>, but I can't find the similar method in Android.</p>
  
  <p>Any inputs? Please comment here if I do not provide enough information. Thank you :)</p>