> For the complete documentation index, see [llms.txt](https://docs.compliance.phalcon.blocksec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.compliance.phalcon.blocksec.com/zh-hant/api-documentation/introduction/authentication.md).

# 驗證

Phalcon Compliance APP REST API 使用 API 金鑰進行安全驗證。請妥善保管您的 API 金鑰，以保護您的資料。

### 取得 API 金鑰

在您的專案工作區中，前往 ***系統 -> API***，然後按一下 ***產生金鑰*** 以建立金鑰。每個專案最多支援 3 個有效金鑰，所有 API 呼叫都會計入您專案的使用配額。

### 使用 API 金鑰

在 HTTP 請求標頭中加入您的 API 金鑰，以驗證 API 請求：

**請求標頭格式**

* Key：api-key
* Value：您的 API 金鑰

### 選用 IP 白名單

您可以在 **系統 → API → 管理 → 安全性設定** 中為每個 API 金鑰設定 IP 白名單。啟用後，請求必須包含有效的 API 金鑰，且來源必須是允許的公用對外 IP 位址。

驗證為選用功能，預設為停用。儲存 IP 白名單並不會啟用驗證；請在應用程式準備就緒後另行開啟。請參閱 [IP 白名單指南](https://docs.compliance.phalcon.blocksec.com/zh-hant/user-manual/account/api-keys/ip-allowlist.md)，了解設定與疑難排解方式。
