---
title: "プッシュ通知を有効にするための Google サービスアカウントを作成する方法"
description: "Google サービス アカウントを設定して Firebase Cloud Messaging を有効化し、Klaviyo プッシュ通知を Android デバイスに送信できるようにする方法をご確認ください。"
canonical_url: "https://help.klaviyo.com/hc/ja-jp/articles/19893982562203"
markdown_url: "https://help.klaviyo.com/hc/ja-jp/articles/19893982562203.md"
locale: "ja-jp"
category: "プッシュ通知"
section: "プッシュ通知のスタートガイド"
updated: "2025-08-06"
---

# プッシュ通知を有効にするための Google サービスアカウントを作成する方法

## このページで学べること

Google サービス アカウントを設定して Firebase Cloud Messaging を有効化し、Klaviyo プッシュ通知を Android デバイスに送信できるようにする方法をご確認ください。 

## 始める前に

以下の手順に進む前に、Androidアプリ用のFirebaseプロジェクトがすでに存在している必要があります。この設定では、同じプロジェクトを一貫して使用してください。

APIを有効にし、カスタムロールとサービスアカウントを作成し、そのロールをサービスアカウントに割り当て、サービスアカウントキーを作成するには、Google Cloudの権限が必要です。これらの操作を完了できない場合は、Google Cloud管理者にアクセス権を依頼するか、設定のサポートを依頼してください。

## Firebase Cloud Messaging APIを有効にする

1. [Google Cloud コンソール](https://console.cloud.google.com/welcome)に移動します。 

2. 左上隅のドロップダウンから Firebase プロジェクトを選択します。

3. [Firebase Cloud Messaging API]を検索してください。

4. マーケットプレイス リストから **Firebase Cloud Messaging API** を選択してください。




![Searching for the Firebase Cloud Messaging API](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/28ec1a17730181ec4fff288b3a05a9c8e7fe3301-1522x1678.jpg?auto=format)

5. **有効化**をクリックして、プロジェクトのAPIを有効にしてください。APIがすでに有効になっている場合は、次のセクションに進んでください。



![Page to enable Firebase Cloud Messaging API](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/f3e543ca4e645fdfb06393a718a3d08223a19c71-547x248.png?auto=format)

## メッセージ作成に対応したカスタムロールを作成する

1. [Google Cloud コンソール ダッシュボード](https://console.cloud.google.com/welcome) で、 *クイック* アクセス セクションの下にある **IAM & 管理者** を選択します。




![All Quick Access links, with only the IAM & Admin option highlighted](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/e4ea1744bb95a4ede63a5869f125cd0463e29b00-2222x1234.jpg?auto=format)

2. 左側のメニューで、**ロール**セクションに移動します。




![Roles highlighted in the left sidebar](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/c04aa2f7f9a65b0327ebc62f5b1d97f38eb80dcb-254x651.png?auto=format)

3. **カスタムロールを作成**をクリックしてください。



![Roles page, where Create role is shown in the upper left](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/0cc58b2e58211c9817d05abfdf15435efe8f9a4d-1999x1213.jpg?auto=format)

4. ロールの**タイトル**、**説明**、**ID**、および**ロールのリリース段階**を入力してください。IDはロール作成後に変更できません。



![Create Role window](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/a4a739baa91ad23230adf582d94b31801c2bb625-1092x1596.jpg?auto=format)

5. **[権限を追加]** をクリックします。

6. *cloudmessaging.messages.create*権限のみを追加してください。（詳細については、[カスタムロールの作成](https://cloud.google.com/iam/docs/creating-custom-roles#creating)に関するGoogleの手順をご覧ください。）




![Searching for the correct role permission](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/7f858108f5716b104cd8e6ed34626cc46c1d0150-1106x1258.jpg?auto=format)

7. **権限を追加**をクリックして、選択した権限をロールに追加します。

8. 準備ができたら、**[作成]**を選択してロールを作成します。 



## Google サービスアカウントを作成する

1. [IAM & 管理者セクション](https://console.cloud.google.com/iam-admin/iam)の左側メニューで、*サービス アカウント*タブに移動します。

2. **[サービスアカウントを作成]**をクリックします。



![Button to create a Google service account](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/a31301eab67af1a58a5908fb91c4e0960d3be1f5-1316x258.png?auto=format)

3. *サービス アカウント名*フィールドと *サービス アカウントの説明*（任意）フィールドに入力します。




![First step of the wizard to create a new service account](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/010e82716997660bf45c722c557980eaaab4fcef-1668x1224.png?auto=format)

4. **[作成して続行]** をクリックします。

5. *ロールを選択* フィールドをクリックします。




![Adding a role to a new service account](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/a448e510151c009c4d54a7de041189bdfac62ba5-1151x1130.png?auto=format)

6. 先ほど作成したカスタム ロールを選択してください。ここでは「Test Role」を選択しますが、前のセクションで作成したロールを選択してください。

7. [**続行**] をクリックします。オプションのサービスアカウントユーザーと管理者アクセスのフィールドは空欄のままにし、**完了**をクリックしてサービスアカウントの作成を完了してください。



## サービス アカウント キーを生成

1. [[サービス アカウント]](https://console.cloud.google.com/iam-admin/serviceaccounts) ページで、前のセクションで作成したサービス アカウントのメールアドレスをクリックします。




![Service accounts page, where the accounts are blurred for security purposes](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/1133fdfc1e8fc1eabff35981fbd55add0e989b6a-1490x689.png?auto=format)

2. **[Keys]** タブに移動します。

3. **[キーを追加]** をクリックしてください。

4. **[新しいキーを作成]** をクリックします。




![Add key dropdown, when the Create new key option is highlighted](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/50d97a3691c25e1f010d596b988c37887046dd2a-1999x842.jpg?auto=format)

5. *キータイプ* で、**[JSON]** を選択します。




![Modal to select the key type when JSON is selected](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/b1d62869b325d3e9640511d4e87306f394b2ed5e-1116x714.jpg?auto=format)

6. **作成**をクリックして、サービスアカウントのキーファイルをダウンロードしてください。



ダウンロードしたファイルは、KlaviyoでAndroidのプッシュ通知を設定する際に見つけられるように、安全な場所に保存してください。このキーファイルは再度ダウンロードできません。以下のJSONはファイル形式の例を示しています。実際の認証情報を使用し、Googleがダウンロードするファイルをアップロードしてください。

`{ "type": "service_account", 
"project_id": "PROJECT_ID", 
"private_key_id": "KEY_ID", 
"private_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----\n", 
"client_email": "SERVICE_ACCOUNT_EMAIL", 
"client_id": "CLIENT_ID", 
"auth_uri": "https://accounts.google.com/o/oauth2/auth", 
"token_uri": "https://accounts.google.com/o/oauth2/token", 
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", 
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/SERVICE_ACCOUNT_EMAIL" }`

## 達成できること

Googleサービスアカウントにメッセージングのロールが付与され、JSONキーがダウンロードされました。[KlaviyoでAndroidのプッシュ通知の設定を続行](https://help.klaviyo.com/hc/ja-jp/articles/14750928993307.md)してキーをアップロードし、接続を完了してください。

## その他のリソース

- [Android のプッシュ通知を設定する方法](https://help.klaviyo.com/hc/ja-jp/articles/14750928993307.md)
  Klaviyo アカウントで Android 向けのプッシュ通知を設定する方法をご確認ください。この記事の手順を完了すると、フローとキャンペーンでプッシュ通知を送信できるようになります。
- [iOS プッシュ通知の設定方法](https://help.klaviyo.com/hc/ja-jp/articles/360023213971.md)
  Klaviyo アカウントでプッシュ通知を設定する方法をご確認ください。この記事の手順を完了すると、フローとキャンペーンでプッシュ通知を送信できるようになります。
