# Cách tạo Firebase Server Key

Firebase Server Key được dùng để gửi Push Notification tới các thiết bị sử dụng hệ điều hành Android.

### 1. Tạo một Firebase project.

Nếu bạn đã có một Firebase project thì hãy bỏ qua bước này và đọc tiếp bước 2. Ngược lại, hãy làm theo hướng dẫn sau để tạo 1 Firebase project.

**1.1.** Vào trang [Firebase Console](https://firebase.google.com/) và đăng nhập bằng tài khoản Google của bạn.

![](/files/-Lst_tM8Oh91gBuBlLJe)

**1.2.** Nhấp vào nút bấm "CREATE A PROJECT".

![](/files/-Lstcmd5FEj3zntuho5R)

**1.3.** Nhập các thông tin và làm theo các bước hướng dẫn của Firebase để tạo Project.

![Nhập Project name, tích đồng ý với Firebase terms và nhấp nút bấm "Continue"](/files/-LstfHE2VmhNuV2lAciy)

![Bật tùy chọn Google Analytics (GA) cho project nếu bạn muốn.](/files/-LstfXfIkx3y-9WhdfxX)

![Chọn hoặc tạo mới tài khoản GA nếu bước trên bạn chọn sử dụng GA.](/files/-Lstg-d4WFHm1sYBshms)

![Nhấp vào "Create a new account" nếu bạn muốn gắn Firebase project với 1 tài khoản GA mới.](/files/-Lstjnu1y7e5v8N3bwxJ)

![Hoàn tất thiết lập và nhấp "Create project" để hoàn thành tạo Firebase project.](/files/-Lstk-0NMKECZrXB_Si6)

### 2. Lấy Firebase Cloud Messaging token (FCM key).

**2.1.** Nhấp vào biểu tượng "Settings" và chọn "Project settings".

![](/files/-LstlDThsoDdeM6-9PUr)

**2.2.** Nhấp vào "Cloud Messaging", tại đây, bạn sẽ thấy FCM key ở dòng **Server Key**. Hãy sao chép key này để sử dụng ở mục cài đặt Android Push trên Pushdy Dashboard.

![](/files/-LstmLMIYYxIzguE-Vlm)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.pushdy.com/i/cai-dat/cach-tao-firebase-server-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
