> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# configureGoogleStorage

> Configure Google Drive backup storage.

## Function Signature

```dart theme={null}
Future<void> configureGoogleStorage({
  required String clientId,
  String? applicationName,
})
```

## Description

Configures Google Drive backup storage. This must be called before using Google Drive for backup or recovery operations.

## Parameters

| Parameter         | Type     | Required | Description                 |
| ----------------- | -------- | -------- | --------------------------- |
| `clientId`        | `String` | Yes      | Your Google OAuth client ID |
| `applicationName` | `String` | No       | Optional application name   |

## Returns

**`void`**

## Example

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

// Configure Google Drive
await portal.configureGoogleStorage(
  clientId: 'your-google-oauth-client-id.apps.googleusercontent.com',
  applicationName: 'My Wallet App',
);

// Now you can use Google Drive backup
final response = await portal.backupWallet(
  method: PortalBackupMethod.googleDrive,
);
```

## Setup Requirements

### Android

1. Create a Google Cloud project
2. Configure OAuth consent screen
3. Create an Android OAuth client ID
4. Add the client ID to your app

### iOS

1. Create a Google Cloud project
2. Configure OAuth consent screen
3. Create an iOS OAuth client ID
4. Add the client ID to your app
5. Add URL schemes to Info.plist

See the [Google Drive backup options guide](../../../resources/backup-options/gdrive) for detailed setup instructions.

## Errors

| Code                   | Description                      |
| ---------------------- | -------------------------------- |
| `NOT_INITIALIZED`      | Portal was not initialized       |
| `CONFIGURATION_FAILED` | Failed to configure Google Drive |

## Related

* [Back up a wallet guide](../guide/back-up-a-wallet)
* [backupWallet](./backupwallet)
* [configurePasskeyStorage](./configurepasskeystorage)
