# Google Cloud Storage Create a Google Cloud Service Account Key

Source: https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/how-tos/setup/create-service-account-key/

The connector authenticates with a service account key, which you upload as a JSON file when you add the datastore. See [Authentication](https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/authentication/) for how the key is used.

Once you have the key, [get the bucket URI](https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/how-tos/setup/get-bucket-uri/), then [add the source datastore](https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/how-tos/datastore/add-source/).

> **Note: Based on the Google Cloud documentation**
>
> These steps follow the official Google Cloud guides [Create service accounts](https://docs.cloud.google.com/iam/docs/service-accounts-create) and [Create and delete service account keys](https://docs.cloud.google.com/iam/docs/keys-create-delete). Google can change its interface and documentation at any time without notice. If a screen or label looks different from what this page describes, follow the official guides.

## Before you start

- **Roles to create them.** Creating the service account needs the **Create Service Accounts** role (`roles/iam.serviceAccountCreator`) on the project, and creating its key needs the **Service Account Key Admin** role (`roles/iam.serviceAccountKeyAdmin`).
- **Key creation can be blocked.** The organization policy constraint `iam.disableServiceAccountKeyCreation` prevents key creation in a project. Google enforces it by default in organizations created on or after May 3, 2024. If you cannot create a key, ask your organization policy administrator for an exception.

## Steps

### Create the service account

**Step 1**: In the Google Cloud console, open **IAM & Admin** > **Service accounts** and select the project that owns the bucket.

**Step 2**: Click **Create service account** and enter a name (for example, `qualytics-gcs`). The console builds the service account ID from it; edit the ID now if needed, because it cannot be changed later.

**Step 3**: Click **Done**. You can skip the optional project-level roles, because the role that matters is granted on the bucket (Step 8).

### Create the key

**Step 4**: In the list of service accounts, click the email address of the new service account.

**Step 5**: Open the **Keys** tab.

**Step 6**: Click **Add key**, then **Create new key**.

**Step 7**: Choose **JSON** and click **Create**. The key file downloads once and cannot be downloaded again, so store it somewhere safe.

### Grant access to the bucket

**Step 8**: Grant the service account the role it needs on the target bucket. See [Permissions](https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/permissions/).

> **Warning**
>
> The key file grants access to your bucket. Store it securely and upload it only to the Qualytics connection form.

*Last updated: November 16, 2026.*
