API を呼び出すには、Google Play デベロッパー アカウントへの API アクセスを設定する必要があります。これには、Google Play Console と Google Cloud コンソールの両方の変更が必要になります。下記の手順では、Google Play Developer API の使用を開始するために必要な以下のステップについて説明します。
Google Cloud プロジェクトを作成する。
リンクした Google Cloud プロジェクトで Google Play Developer API を有効にする。
適切な Google Play Console の権限でサービス アカウントを設定し、Google Play Developer API にアクセスします。
各ユーザーの代わりに API にアクセスする必要がある場合は、OAuth クライアント ID を使用してください。たとえば、ウェブサイトがユーザーの代わりにウェブ クライアントから Google Play Developer API にアクセスする必要がある場合に、クライアント ID を使用できます。そのユーザーは、サービス アカウントではなく Google アカウントで認証されることになります。ウェブサイトはこれにより、サービス アカウントの認証情報を損なうことなく、ユーザーの代わりに API を呼び出せます。
一部の API では、Google Play Console デベロッパー ID を指定する必要があります。これは、Google Play デベロッパー アカウントの作成時に割り当てられた長い番号です。デベロッパー ID は、Google Play Console のほぼすべてのページ([API アクセス] ページなど)の URL で確認できます。
注: アプリを別の Google Play デベロッパー アカウントに移行すると、そのアプリに関連付けられているデベロッパー ID が変更されます。つまり、移行が完了した後は、そのアプリの API 呼び出しで新しい Google Play デベロッパー アカウントのデベロッパー ID を使用する必要があります。
専用 API
Google Play Developer API には、アプリの特殊な分析を行うための専用 API が含まれています。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eYou need to set up API access in the Google Play Console and Google Cloud Console to use the Google Play Developer API.\u003c/p\u003e\n"],["\u003cp\u003eA service account is generally recommended for accessing the API, while OAuth clients are used for individual user access.\u003c/p\u003e\n"],["\u003cp\u003eGrant the service account necessary permissions in the Google Play Console to enable API functionality.\u003c/p\u003e\n"],["\u003cp\u003eTo find your Developer ID, check the URL of any page in the Google Play Console, such as the API access page.\u003c/p\u003e\n"],["\u003cp\u003eExplore specialized APIs and client libraries for specific tasks and programmatic access.\u003c/p\u003e\n"]]],["To access the Google Play Developer API, begin by creating a Google Cloud Project and enabling the Google Play Developer API within it. Then, configure access via a service account for secure server-side access, or an OAuth client for individual user access. For service accounts, create one in Google Cloud Console and invite it as a user in Google Play Console, granting necessary permissions. For OAuth clients, create an OAuth consent screen and then an OAuth client ID. Finally, you can retrieve your unique developer id from the Google Play Console URL.\n"],null,["# Getting Started\n\n| **Note:** You no longer need to link your developer account to a Google Cloud Project in order to access the Google Play Developer API.\n\nBefore you can start making API calls, you need to set up API access to your\nGoogle Play Developer Account. This involves changes in both the\nGoogle Play Console and Google Cloud Console. The following instructions\nexplain the steps needed to start using the Google Play Developer API.\n\n1. Create a Google Cloud Project.\n2. Enable the Google Play Developer API for your Google Cloud Project.\n3. Set up a service account with appropriate Google Play Console permissions to access the Google Play Developer API.\n\nCreate a Google Cloud Project\n-----------------------------\n\nYou can skip this step if you already have a Google Cloud Project\nyou want to use.\n\nCreate a project in the\n[Google Cloud Console](https://console.cloud.google.com/projectcreate).\n\nFor further information on Google Cloud Projects,\nrefer to [Creating and managing projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\nEnable the API\n--------------\n\nOnce you have set up the Google Cloud Project, you need to enable\nthe Google Play Developer API for this project.\n\nTo enable Google Play Developer API:\n\n1. Go to the [Google Play Developer API page](https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/) in Google Cloud Console.\n2. Click **Enable**.\n\nConfigure OAuth and Service Accounts\n------------------------------------\n\nYou need to configure access to the Google Play Developer API with an OAuth client or\na service account. In most cases, you should use a service account\nto access the API.\n\nService accounts must be used in a secure environment, such as your server.\nThe service account credentials need to be securely managed so they are not\nrevealed to anyone that is not authorized to use the API.\n\nThe OAuth Client ID should be used if you need to access the API on behalf\nof an individual user. For example, if your website needs to access the\nGoogle Play Developer API from the web client on behalf of the user, you can use the\nClient ID. The user will be authenticated with their Google account instead\nof the service account. This allows you to make API calls on behalf of a user\nwithout compromising service account credentials.\n\n- Service account: A secure software service will access the API (most common)\n- OAuth clients: A user will access the API\n\n### Use a service account\n\nYou can create a [service account](/accounts/docs/OAuth2ServiceAccount) from\nthe Google Play Console.\n\n1. In the Google Cloud Console go to [Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts).\n2. Click **Create service account** and follow the steps.\n3. Go to the [Users \\& Permissions](https://play.google.com/console/users-and-permissions) page on the Google Play Console.\n4. Click **Invite new users**.\n5. Put an email address for your service account in the email address\n field and grant the necessary rights to perform actions.\n\n To use the Google Play Billing APIs, you must grant the following permissions:\n - *View financial data, orders, and cancellation survey responses*\n - *Manage orders and subscriptions*\n6. Click **Invite user**.\n\nAt this point, you should be able to access the Google Play Developer API through the\nservice account. For more information, see [Using OAuth 2.0 for Server to Server\nApplications](/accounts/docs/OAuth2ServiceAccount).\n\n### Use OAuth clients\n\nYou can allow users to perform actions using the API under their own credentials\nusing an [OAuth](https://developers.google.com/accounts/docs/OAuth2) client.\nA user's actions are limited to those permitted via the\n[Users and permissions](https://play.google.com/console/users-and-permissions)\npage on the Google Play Console.\n\nBefore creating OAuth clients, you need to configure branding information for\nyour product. For more information, see [Setting up your OAuth consent screen](https://support.google.com/cloud/answer/10311615).\n\n1. In the Google Cloud Console, go to [OAuth consent screen page](https://console.cloud.google.com/apis/credentials/consent).\n2. Follow the steps to create OAuth consent screen.\n\nTo create an OAuth client:\n\n1. In the Google Cloud Console, go to [Credentials](https://console.cloud.google.com/apis/credentials).\n2. Click Create Credentials \\\u003e OAuth client ID.\n3. Choose your application type and follow the instructions.\n\nAdditional information\n----------------------\n\nUse the following tips and tricks to help you get started with API usage on\nGoogle Play.\n\n### Obtain your Developer ID\n\nSome APIs require you to provide a Google Play Console Developer ID. This\nis a long number that was assigned when your Google Play Developer Account\nwas created. Your Developer ID can be found in the URL of almost any page on the\nGoogle Play Console, such as the\n[API access](https://play.google.com/console/api-access) page.\n\nFor example, consider the Google Play Console URL: \n\n https://play.google.com/console/developers/1234567890123456789/api-access\n\nIn the URL above, the Developer ID would be `1234567890123456789`.\n\n**Note:** If an app is transferred from one Google Play Developer Account\nto another, the Developer ID associated with that app will change. This means\nthat after the transfer completes, you must use the Developer ID for the new\nGoogle Play Developer Account account in API calls for that app.\n\n### Specialized APIs\n\nThe Google Play Developer API contains several specialized APIs that allow\nyou to perform specific types of analysis on your app:\n\n[Reply to Reviews API](/android-publisher/reply-to-reviews)\n: Allows you to view user feedback for your app and reply to this feedback.\n\n[Voided Purchases API](/android-publisher/voided-purchases)\n: Allows you to revoke access to in-app products associated with purchases that\n a user has voided.\n\n### Client libraries\n\nWe have provided client libraries you can use to programmatically\naccess the REST APIs. For more information, see [Client Libraries and Code\nSamples](/android-publisher/libraries)."]]