---
title: "Google Play ConsoleでサービスアカウントキーファイルをGoogleする"
description: "Adaptyとのシームレスな連携のためのサービスアカウントキーファイルの作成方法を学びましょう。"
---

Play StoreのモバイルアプリをAdaptyと連携するには、Google Play Consoleで特別なサービスアカウントキーファイルを生成してAdaptyにアップロードする必要があります。これらのファイルはアプリのセキュリティを強化し、不正アクセスを防ぎます。

:::warning
新しいサービスアカウントが有効になるまで、通常は少なくとも24時間かかります。ただし、[回避策](https://stackoverflow.com/a/60691844)があります。[Google Play Console](https://play.google.com/apps/publish/)でサービスアカウントを作成した後、任意のアプリを開いて **Monetize** -> **Products** -> **Subscriptions/In-app products** に移動します。任意のプロダクトの説明を編集して保存すると、サービスアカウントがすぐに有効化されます。その後、変更を元に戻すことができます。
:::

1. Google Play Consoleの[**Service accounts**](https://console.cloud.google.com/iam-admin/serviceaccounts)セクションを開きます。正しいプロジェクトが選択されていることを確認してください。

  <img src="/assets/shared/img/c3156cb-action_manage_keys.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

2. 開いたウィンドウで **Add key** をクリックし、ドロップダウンメニューから **Create new key** を選択します。

  <img src="/assets/shared/img/44b30ee-create_new_key.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

3. **Create private key for [Your_project_name]** ウィンドウで **Create** をクリックします。秘密鍵がJSONファイルとしてコンピューターに保存されます。**Private key saved to your computer** ウィンドウに表示されたファイル名を使って確認できます。

  <img src="/assets/shared/img/e7b8101-cretae_private_key.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

4. **Create private key for Your_project_name** ウィンドウで **Create** ボタンをクリックします。これにより、秘密鍵がJSONファイルとしてコンピューターに保存されます。必要に応じて、表示された **Private key saved to your computer** ウィンドウのファイル名を使ってファイルを見つけることができます。

  <img src="/assets/shared/img/187ddc6-Private_key_saved.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

このファイルは、[Google Play Store連携を設定する](google-play-store-connection-configuration)際に必要になります。

:::warning
新しいサービスアカウントが有効になるまで、通常は少なくとも24時間かかります。ただし、[回避策](https://stackoverflow.com/a/60691844)があります。[Google Play Console](https://play.google.com/apps/publish/)でサービスアカウントを作成した後、任意のアプリを開いて **Monetize** -> **Products** -> **Subscriptions/In-app products** に移動します。任意のプロダクトの説明を編集して保存すると、サービスアカウントがすぐに有効化されます。その後、変更を元に戻すことができます。
:::

**次のステップ**

- [Google Play Store連携を設定する](google-play-store-connection-configuration)