---
title: "Tạo tài khoản dịch vụ trong Google Cloud Console"
description: "Tìm hiểu cách tạo tài khoản dịch vụ để truy cập API an toàn trong Adapty."
---

Để Adapty tự động hóa việc truy cập dữ liệu, cần có một tài khoản dịch vụ trong Google Play Console.

1. Mở mục [**IAM & Admin** -> **Service accounts**](https://console.cloud.google.com/iam-admin/serviceaccounts) trong Google Cloud Console. Hãy đảm bảo bạn đang dùng đúng project.

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

2. Trong cửa sổ **Service accounts**, nhấn nút **Create service account**.

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

3. Trong phần con **Service account details** của cửa sổ **Create service account**, nhập **Service Account Name** tùy ý. Chúng tôi khuyên bạn nên đặt tên có chứa "Adapty" để dễ nhận biết mục đích của tài khoản này. **Service account ID** sẽ được tạo tự động.

4. Sao chép địa chỉ email của tài khoản dịch vụ và lưu lại để dùng sau.

5. Nhấn nút **Create and continue**.

   

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

6. Trong danh sách thả xuống **Select a role** của phần con **Grant this service account access to project**, chọn **Pub/Sub -> Pub/Sub Admin**. Vai trò này cần thiết để bật thông báo nhà phát triển theo thời gian thực.

   

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

7. Nhấn nút **Add another role**.

8. Trong danh sách thả xuống **Role** mới xuất hiện, chọn **Monitoring -> Monitoring Viewer**. Vai trò này cần thiết để cho phép giám sát hàng đợi thông báo.

9. Nhấn nút **Continue**.

   

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

10. Nhấn nút **Done** mà không thay đổi gì. Cửa sổ **Service accounts** sẽ mở ra.

**Tiếp theo**

- [Cấp quyền cho tài khoản dịch vụ trong Google Play Console](grant-permissions-to-service-account)