---
title: "Bật Developer APIs trong Google Play Console"
description: "Bật Developer API của Adapty để tự động hóa và tối ưu hóa việc quản lý gói đăng ký trong ứng dụng của bạn."
---

<div style={{
    maxWidth: '560px',
    margin: '0 auto 2rem',
    position: 'relative',
    aspectRatio: '16/9',
    width: '100%'
}}>
    <iframe
        style={{
            position: 'absolute',
            top: 0,
            left: 0,
            width: '100%',
            height: '100%'
        }}
        src="https://www.youtube.com/embed/7dN50n5bcLc?si=c2znttIb--4VcrRO"
        title="YouTube video player"
        frameBorder="0"
        allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
        referrerPolicy="strict-origin-when-cross-origin"
        allowFullScreen
    />
</div>

Nếu ứng dụng của bạn có trên Play Store, việc kích hoạt Developer APIs là bước quan trọng để tích hợp với Adapty. Bước này đảm bảo kết nối thông suốt giữa ứng dụng và nền tảng của chúng tôi, hỗ trợ các quy trình tự động và phân tích dữ liệu thời gian thực để tối ưu mô hình gói đăng ký. Các API sau cần được bật:

- [Google Play Android Developer API](https://console.cloud.google.com/apis/library/androidpublisher.googleapis.com)
- [Google Play Developer Reporting API](https://console.cloud.google.com/apis/library/playdeveloperreporting.googleapis.com)
- [Cloud Pub/Sub API](https://console.cloud.google.com/marketplace/product/google/pubsub.googleapis.com)

Nếu ứng dụng của bạn không phân phối qua Play Store, bạn có thể bỏ qua bước này. Tuy nhiên, nếu bạn có bán qua Play Store, bạn có thể tạm hoãn bước này, dù đây là yêu cầu thiết yếu cho chức năng cơ bản của Adapty. Sau khi hoàn tất quá trình onboarding, bạn có thể cấu hình cài đặt cửa hàng trong phần **App settings**.

Dưới đây là cách bật Developer APIs trong Google Play Console:

1. Mở [Google Cloud Console](https://console.cloud.google.com/).

2. Ở góc trên bên trái cửa sổ Google Cloud, chọn dự án bạn muốn sử dụng hoặc tạo dự án mới. Đảm bảo bạn dùng cùng một dự án Google Cloud cho đến khi tải tệp khóa service account lên Adapty.

   

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

3. Mở trang [**Google Play Android Developer API**](https://console.cloud.google.com/apis/library/androidpublisher.googleapis.com).

   

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

4. Nhấn nút **Enable** và chờ đến khi trạng thái **Enabled** hiện ra. Điều này có nghĩa là Google Android Developer API đã được bật.

   

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

5. Mở trang [**Google Play Developer Reporting API**](https://console.cloud.google.com/apis/library/playdeveloperreporting.googleapis.com).

   

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

6. Nhấn nút **Enable** và chờ đến khi trạng thái **Enabled** hiện ra.

   

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

7. Mở trang [**Cloud Pub/Sub API**](https://console.cloud.google.com/marketplace/product/google/pubsub.googleapis.com).

   

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

8. Nhấn nút **Enable** và chờ đến khi trạng thái **Enabled** hiện ra.

   

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

Developer APIs đã được bật.

Bạn có thể kiểm tra lại trên trang [**APIs & Services**](https://console.cloud.google.com/apis/dashboard) của Google Cloud Console. Cuộn trang xuống và xác nhận bảng ở cuối trang có đủ 3 API sau:

- Google Play Android Developer API
- Google Play Developer Reporting API
- Cloud Pub/Sub API

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

**Bước tiếp theo**

- [Tạo service account trong Google Cloud Console](create-service-account)