# 身份验证

我们的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/P6idY1svKWqeuLYTxW80" alt=""><figcaption></figcaption></figure>

### 如何使用API密钥

在每个API请求的HTTP请求头中包含"**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_cn/blocksec-fan-xi-qian-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.
