Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Lưu ý: Bạn không cần liên kết tài khoản nhà phát triển với Google Cloud Console nữa để truy cập vào API Google Play Developer Reporting.
Để có thể bắt đầu thực hiện các lệnh gọi API, bạn cần thiết lập quyền truy cập API vào Tài khoản nhà phát triển của mình trên Google Play.
Việc này liên quan đến những thay đổi trong cả Google Play Console và Google Cloud Console.
Các hướng dẫn sau đây giải thích 4 bước cần thiết để bắt đầu sử dụng API Báo cáo dành cho Nhà phát triển của Google Play:
Tạo một dự án trên Google Cloud.
Bật Google Play Developer Reporting API cho dự án Google Cloud của bạn.
Thiết lập một tài khoản dịch vụ có các quyền thích hợp trên Google Play Console để truy cập vào API Báo cáo dành cho nhà phát triển của Google Play.
Tạo một dự án trên Google Cloud
Bạn có thể bỏ qua bước này nếu đã có một dự án trên Google Cloud mà bạn muốn sử dụng.
Bạn phải thiết lập một dự án Google Cloud để sử dụng Google Play Developer Reporting API. Bạn có thể thực hiện việc này trong Google Cloud Console.
Để biết thêm thông tin về các dự án trên Google Cloud, hãy tham khảo bài viết Tạo và quản lý dự án.
Đối với các tập lệnh và ứng dụng giám sát mà không có người dùng nào tham gia, bạn nên sử dụng tài khoản dịch vụ. Tài khoản dịch vụ được thiết kế và phải được sử dụng trong một môi trường bảo mật, chẳng hạn như máy chủ của bạn.
Bạn cần quản lý thông tin đăng nhập của tài khoản dịch vụ một cách an toàn để không ai có quyền sử dụng API biết được thông tin này.
Nhấp vào Tạo tài khoản dịch vụ rồi làm theo các bước.
Tài khoản dịch vụ xác định riêng một dự án trên Google Cloud, nên bạn không cần dùng khoá API.
Cấp quyền trong Google Play Console
Để cho phép bất kỳ tài khoản dịch vụ nào truy cập vào dữ liệu Google Play Console cho ứng dụng của bạn, bạn phải cấp quyền truy cập cho các tài khoản đó.
Nhập địa chỉ email cho tài khoản dịch vụ của bạn vào trường địa chỉ email và cấp các quyền cần thiết để thực hiện hành động. Tốt nhất là bạn nên cấp cho tài khoản dịch vụ một bộ quyền tối thiểu cần thiết để gọi các thao tác API bắt buộc.
Nhấp vào nút Mời người dùng.
Sau khi hoàn tất các bước này, bạn sẽ có thể truy cập vào API Báo cáo dành cho nhà phát triển Google Play thông qua tài khoản dịch vụ bằng khoá API thích hợp.
Tài liệu tham khảo
Để tra cứu một loại tài nguyên hoặc phương thức cụ thể, hãy xem phần Tài liệu tham khảo.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eGoogle Play Developer Reporting API access no longer requires linking a developer account to Google Cloud Console.\u003c/p\u003e\n"],["\u003cp\u003eTo use the API, you need to set up API access involving creating a Google Cloud project, enabling the API, and setting up a service account with Google Play Console permissions.\u003c/p\u003e\n"],["\u003cp\u003eService accounts are recommended for automated tasks and require secure management of their credentials.\u003c/p\u003e\n"],["\u003cp\u003eGranting necessary permissions to the service account in the Google Play Console allows it to access your app data for reporting purposes.\u003c/p\u003e\n"]]],[],null,["# Getting Started\n\nNote: You no longer need to link your developer account to a Google Cloud Console in order to access the Google Play Developer Reporting API.\n\nBefore you can start making API calls, you need to set up API access to your Google Play Developer Account.\nThis involves changes in both the Google Play Console and Google Cloud Console. The\nfollowing instructions explain the four steps needed to start using the Google Play Developer Reporting API:\n\n1. Create a Google Cloud project.\n2. Enable the Google Play Developer Reporting API for your Google Cloud project.\n3. Set up a service account with appropriate Google Play Console permissions to access the Google Play Developer Reporting API.\n\nCreate a Google Cloud project\n-----------------------------\n\nYou can skip this step if you already have a Google Cloud project you want to use.\n\nSetting up a Google Cloud project is required to use the Google Play Developer Reporting API. You can do it in [Google Cloud Console](https://console.cloud.google.com/projectcreate).\n\nFor further information on Google Cloud projects, refer to [Creating and managing projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\nEnable the API\n--------------\n\nTo enable Google Play Developer Reporting API:\n\n1. Go to the [Google Play Developer Reporting API page](https://console.developers.google.com/apis/api/playdeveloperreporting.googleapis.com/) in Google Cloud Console.\n2. Click **Enable**.\n\nConfigure service accounts\n--------------------------\n\n\nFor monitoring scripts and applications, where no human user is in the loop, service accounts\nare recommended. Service accounts are designed and must be used in a secure environment,\nsuch as your server.\nThe service account credentials need to be managed securely so they are not\nrevealed to anyone that is not authorized to use the API.\n\n### Create a service account\n\n\nTo create a new service account:\n\n1. In the Google Cloud Console go to [Service Accounts page](https://console.cloud.google.com/iam-admin/serviceaccounts).\n2. Click **Create service account** and follow the steps.\n\n\nService accounts uniquely identify a Google Cloud project, so there is no need to use API keys.\n\n### Grant permissions in the Google Play Console\n\n\nTo allow any of the service accounts access to the Google Play Console data for\nyour apps, they have to be granted access.\n\n1. Go to the [Users \\& Permissions page](https://play.google.com/console/users-and-permissions) on the Google Play Console.\n2. Click **Invite new users**.\n3. Put an email address for your service account in the email address field and grant the necessary rights to perform actions. It is best to grant the service account the minimal set of permissions needed to call the required API actions.\n4. Click the **Invite user** button.\n\n\nOnce you complete these steps, you should be able to access the Google Play Developer Reporting API\nthrough the service account, using the appropriate API key.\n| Different metric sets require different permissions. See the reference documentation for details on the particular permissions required to access each metric set.\n\nReference\n---------\n\n\nTo look up a particular resource type or method, see the\n[Reference](/play/developer/reporting/reference/rest)."]]