# 域名&鉴权\&APPID

### 1、**API 域名** <a href="#api-yu-ming" id="api-yu-ming"></a>

​<https://openapi.trustformer.info>

### 2、接口鉴权 <a href="#jie-kou-jian-quan" id="jie-kou-jian-quan"></a>

登录KYT系统后，在帐号设置页面，可以获取apikey和secretkey。在请求接口时，为了保障安全性，除了传递apikey，还需要按规定的算法进行加密签名。并在header中传递时间戳timestamp和签名sign参数。

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

#### Header参数

<table data-header-hidden><thead><tr><th width="143"></th><th width="111"></th><th width="114"></th><th></th></tr></thead><tbody><tr><td><strong>参数名</strong></td><td><strong>数据类型</strong></td><td><strong>是否必传</strong></td><td><strong>描述</strong></td></tr><tr><td>timestamp</td><td>int</td><td>true</td><td>时间戳（单位s）</td></tr><tr><td>sign</td><td>string</td><td>true</td><td><p><strong>签名计算方式：</strong>sha256("timestamp={时间戳}&#x26;secret={secretkey}")</p><p><strong>在线加密工具：</strong>https://crypot.51strive.com/sha256.html</p><p><strong>示例：</strong></p><p>加密前： timestamp=1677148682&#x26;secret=9e3df800bbcbb1b8fc97bf78ed95a95a92aa3a155d270f1e48eb330c2d435321</p><p>加密后： 110a20dcbe1fef5456051a8887c8d1aeba637bbc624e606697fb82a7e7ded604</p></td></tr></tbody></table>

#### 鉴权异常

apikey过期或错误，接口返回：

```
{
    "code": -1,
    "data": {},
    "message": "api_key is invalid"
}
```

### 3、APPID参数 <a href="#jie-kou-jian-quan" id="jie-kou-jian-quan"></a>

在KYT系统的规则引擎页面，创建APP后，会在页面上方显示每套规则配置的APPID。

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


---

# 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.bokk.ltd/readme/v2-ban/yu-ming-jian-quan-appid.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.
