This page refers to a deprecated version of Google Sign-In. New projects should use the current version.

Revoking Access Tokens and Disconnecting the App

It is highly recommended that you provide users that signed in with Google the ability to disconnect their Google account from your app. If the user deletes their account, you must delete the information that your app obtained from the Google APIs.

The following code shows a simple example of calling the GoogleApiClient.revokeAccessAndDisconnect method:

public void onClick(View view) {
    // ...
    if (view.getId() == {
private void onDisconnectClicked() {
    // Revoke all granted permissions and clear the default account.  The user will have
    // to pass the consent screen to sign in again.
    if (mGoogleApiClient.isConnected()) {


In the onResult callback, you can respond to the event and trigger any appropriate logic in your app or your back-end code.