這個 API 的用途非常多樣,例如可以製作個別訂單的報表及進行對帳,以及驗證購買交易和訂閱效期。您也可以透過這個 API 瞭解已取消的訂單,並確認應用程式內商品是否已使用 (包括是否在取消前使用)。
最佳做法
將訂閱資訊儲存在伺服器上,以免發出不必要的 API 呼叫。如果應用程式需要驗證訂閱,您應該依賴伺服器上的快取資訊,而不是重複向 Google 發出 API 呼叫。
在以下兩種情況中,您的安全伺服器應使用 Google Play Developer API 取得訂閱資訊:
您的伺服器收到從未看過的新購買憑證。
您的伺服器收到即時開發人員通知 (RTDN),指示您需使用購買憑證來取得新的訂閱資訊。
請勿透過定期輪詢 API 的方式取得訂閱狀態。例如,請不要每天呼叫 API 來檢查各項訂閱。
您會在訂閱到期或續訂時收到 RTDN,因此不需要根據預定的到期時間安排 API 呼叫。
Reporting API
Reporting API 專為開發人員打造,可讓您以 Play 管理中心資料為基礎,建構自動化的工作流程,或是運用 Play 管理中心資料 (可能與其他資料集搭配使用) 製作內部業務報表和分析。這樣一來,您就能以程式輔助方式存取應用程式層級資料和指標,進而建立內部報表、分析和自動化作業。
Reporting API 提供 Android Vitals 資料的存取權,包括當機率、ANR 發生率、喚醒和 Wake Lock 問題,以及錯誤堆疊追蹤。
最佳做法
這個版本的 Reporting API 預設每秒查詢上限為 10 次。您可以前往 Google Cloud 控制台的「配額」部分查看配額用量。如果需要更多查詢額度,請使用這份表單提交配額要求。
Reply to Reviews API
Reply to Review API 可讓您查看及回覆應用程式的使用者意見回饋。您可以使用這個 API,直接在客戶關係管理系統等現有客戶服務工具包中與使用者互動。
Reply to Review API 只能讓您存取正式版應用程式的意見回饋。如果您想查看 Alpha 版或 Beta 版應用程式的意見回饋,請改用 Google Play 管理中心。另請注意,這個 API 只會顯示包含留言的評論。如果使用者已對應用程式評分,但並未留言,您就無法透過這個 API 存取他們的意見回饋。
Permissions API
開發人員可利用 Permissions API 自動化管理 Play 管理中心內的權限。這樣一來,您就能靈活控管開發人員帳戶權限的授予對象,不必手動操作。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Google Play Developer APIs\n\nOverview\n--------\n\nThe Google Play Console provides a suite of REST-based web service APIs that let\nyou perform publishing, reporting, and other app-management functions directly\nfor your app.\n\nNot all developers need to use these developer APIs --- in most cases you can\ncontinue to manage your apps directly using the Google Play Console. However,\nif you have a large number of APKs to manage, or have to track user purchases\nand subscriptions, you might find these APIs to be useful.\n\n### What's included\n\nThe Google Play Developer APIs let you focus on designing and developing your\napp, while spending less time and effort managing your releases, even as you\ngrow to new markets.\n\nThe Google Play Console includes a suite of APIs that you can use to manage your\napp:\n\n- The [Publishing API](#publishing) lets you upload and publish apps, and perform other publishing-related tasks.\n- The [Subscriptions and In-App Purchases API](#subscriptions) lets you manage in-app purchases and subscriptions. (This was previously known as the \"Purchase Status API\".)\n- The [Reporting API](#reporting) lets you retrieve information about your app's quality from Android vitals.\n- The [Reply to Reviews API](#reviews) lets you retrieve and reply to reviews of your app.\n- The [Permissions API](#permissions) lets you automate permission management within the Play Console.\n- The [Play Games Services Management API](/games/pgs/management/management) lets you issue REST calls to programmatically control the metadata underlying the Google Play Games Services features.\n- The [Voided Purchases API](#voided-purchases) provides a list of orders that are associated with purchases that a user has voided.\n\n### Getting started\n\nTo get started with the Google Play Developer APIs, see the [getting\nstarted](https://developers.google.com/android-publisher/getting_started)\ndocumentation.\n\nPublishing API\n--------------\n\nThe [Publishing API](https://developers.google.com/android-publisher#publishing)\nlets you to automate frequent tasks having to do with app distribution.\nThis provides functions similar to those available to a developer through the\nPlay Console, such as:\n\n- Uploading new versions of an app\n- Releasing apps, by assigning APKs to various [tracks](https://developers.google.com/android-publisher/tracks) (alpha, beta, staged rollout, or production)\n- Creating and modifying Google Play Store listings, including localized text and graphics and multidevice screenshots\n\nThose tasks are performed using the\n[edits](https://developers.google.com/android-publisher/edits)\nfunctionality, which takes a transactional approach to making changes.\nThis lets you bundle several changes into a single draft edit, then commit\nthe changes all at once. (None of the changes take effect until the edit is\ncommitted.)\n| **Note:** Not all developers need to use this API. All the functionality provided by the API is also available through the Google Play Console. However, this API lets you integrate your app and listing update process with your existing tools, which is useful for some developers. In particular, if you have a large number of APKs to manage, or localized listings in many different locales, you may find this API invaluable.\n\n### Best practices\n\n- Limit the number of app updates. Don't publish alpha or beta updates more frequently than once a day (production apps should be updated even less frequently than that). Every update costs your users time and possibly money. If you update too frequently, users might start ignoring updates, or even uninstall the product.\n\nSubscriptions and In-App Purchases API\n--------------------------------------\n\nThe [Subscriptions and In-App Purchases API](https://developers.google.com/android-publisher#subscriptions)\nallows you to manage your app's\ncatalog of in-app products and subscriptions. In addition, with the\nSubscriptions and In-App Purchases API, you can quickly retrieve the details of\nany purchase using a standard `GET` request.\n\nIn the request, you supply information about the purchase --- app package name,\npurchase or subscription ID, and the purchase token. The server responds with a\nJSON object describing the associated purchase details, order status, developer\npayload, and other information.\n\nYou can use this API in several ways, such as for reporting and\nreconciliation of individual orders and for verifying purchases and subscription\nexpirations. You can also use the API to learn about canceled orders and confirm\nwhether in-app products have been consumed, including whether they were consumed\nbefore being canceled.\n| **Note:** The Subscriptions and In-App Purchases API does not use the transactional \"edits\" functionality used by the [Publishing API](/google/play/developer-api/publisher-api). Methods for the [Inappproducts](https://developers.google.com/android-publisher/api-ref/rest/v3/inappproducts) and [Purchases.subscriptions](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions) resources take effect immediately. Each resource's API reference page notes specifically whether the methods for that resource use the \"edits\" model.\n\n### Best practices\n\n- Store subscription information on your server to avoid making unnecessary API calls. When your app needs to verify a subscription, you should rely on the cached information on your server instead of repeating the API call to Google.\n- There are two scenarios in which your secure server should use the Google Play Developer API to get subscription information:\n - Your server receives a new purchase token that has not been seen before.\n - Your server receives a real-time developer notification (RTDN), which indicates that you need to use the purchase token to get the new subscription information.\n- Don't poll the API for subscription status on a regular basis. For example, don't call the API daily to check each subscription.\n- Since you receive an RTDN when the subscription expires or renews, you don't need to schedule an API call based on the scheduled expiry time.\n\nReporting API\n-------------\n\nThe [Reporting API](https://developers.google.com/play/developer/reporting)\nis for developers who want to build automated workflows on top of\nPlay Console data, or developers who use Play Console data for internal business\nreporting and analysis, potentially alongside\nother datasets. This gives you programmatic access to app-level data and metrics\nfor internal reporting, analysis, and automation.\n\nThe reporting API offers access to Android vitals data,\nincluding crash rate, ANR rate, wake-up and wake-lock issues, and error stack\ntraces.\n\n### Best practices\n\n- This version of the Reporting API has a default limit of 10 queries per second. You can view your quota usage in the [Quotas section](https://pantheon.corp.google.com/apis/api/playdeveloperreporting.googleapis.com/quotas) of the Google Cloud Console. If you need to exceed this limit, you can submit a quota request using [this form](https://support.google.com/googleplay/android-developer/contact/apiqr).\n\nReply to Reviews API\n--------------------\n\nThe [Reply to Reviews API](https://developers.google.com/android-publisher/reply-to-reviews) allows you to view user feedback\nfor your app and reply to this feedback. You can use this API to interact with\nusers directly within your existing customer support toolkit, such as a CRM system.\n\nThe Reply to Reviews API allows you to access feedback only for production\nversions of your app. If you want to see feedback on alpha or beta versions of\nyour app, use the Google Play Console instead. Also, note that the API shows only\nthe reviews that include comments. If a user rates your app but does not provide\na comment, their feedback is not accessible from the API.\n\nPermissions API\n---------------\n\nThe Permissions API gives developers the ability to [automate permission\nmanagement](https://developers.google.com/android-publisher/api-ref/rest/v3/users/list)\nwithin the Play Console. This can allow you flexible control over who\nhas access to your developer account, without manual involvement.\n\nWith the Permissions API, you can perform administrative functions such as:\n\n- Removing users' access when they leave your company.\n- Granting access to an app when a user joins the relevant team.\n\nVoided purchases API\n--------------------\n\nThe [Voided Purchases API](https://developers.google.com/android-publisher/voided-purchases)\nprovides a list of orders that are associated with purchases that a user has\nvoided. You can use information from this list to implement a revocation system\nthat prevents the user from accessing products from those orders.\n\nThis API applies to one-time in-app orders and app subscriptions.\n\nA purchase can be voided in the following ways:\n\n- The user requests a refund for their order.\n- The user cancels their order.\n- An order is charged back.\n- Developer cancels or refunds order. Note: only revoked orders will be shown in the Voided Purchases API. If developer refunds without setting the revoke option, orders will not show up in the API.\n- Google cancels or refunds order.\n\nBy using this API, you help create a more balanced and fair experience for all\nof your app's users, particularly if your app is a game."]]