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

# 身份驗證

我們的 API 使用 API 金鑰進行認證。為確保您的數據安全，**請勿與任何人分享您的 API 金鑰。**

### 如何獲取 API 金鑰？

要生成 API 金鑰，首先[註冊一個 BlockSec 帳戶](https://account.blocksec.com/signup?referer=https%3A%2F%2Fmetasleuth.io)。註冊完成後，進入\_**設置**\_部分的 [APIs](https://metasleuth.io/settings?type=apis) 面板快速獲取您的 API 金鑰。

{% hint style="info" %}
如果您是通過我們的銷售渠道訂閱的定制 API 服務，請與您的指定服務聯繫人取得聯繫以獲取 API 金鑰。
{% endhint %}

<figure><img src="/files/jc4IA1UAlSTh0Vwp2Qhu" alt=""><figcaption></figcaption></figure>

### 如何使用 API 金鑰

在每個 API 請求的 HTTP Request Headers 中包含 "**API-KEY**" 標頭，並提供您的 API 金鑰作為值。請參考以下示例。

{% code overflow="wrap" %}

```sh
curl -L \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'API-KEY:$API_KEY' \
  'https://aml.blocksec.com/address-label/api/v3/labels' \
  -d '{"chain_id":1,"address":"0x00d7e7409bfe09a736d3e993de9b87d0baa314d5"}'
```

{% endcode %}
