# 身份驗證

我們的 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 %}


---

# 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://docs.metasleuth.io/zh_tw/blocksec-aml-api/introduction/authentication.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.
