签名验证

创思安全2024-11-07 12:30:52

当您通过上述步骤完成 API 接入后,可通过如下方式验证文本内容检测服务是否接入成功。

请求地址

https://api.chuangsiai.com/api/verify/signature

请求方式

POST

请求头

参考公共请求头部分即可

请求参数

POST /api/verify/signature HTTP/1.1
Host: api.chuangsiai.com
X-Timestamp: 1731042327221
X-Nonce: c3aed234-7856-43b8-9c74-7542020e2ff8
Content-Type: application/json
Authorization: ak_0f77303296f58fbfa4f153432e8:5062004fc8ad1d842bcc11771629e484da19a570729fe7ec8c66183e5444ef5

{}
curl --location --request POST 'https://api.chuangsiai.com/api/verify/signature' \
--header 'X-Timestamp: 1731048527650' \
--header 'X-Nonce: 26daeae2-35a9-4763-8e41-bcdb8413b4ba' \
--header 'Authorization: ak_0f77303c96f58fbfa4f158432e8b27ad:676bf80551fa24e50578c5ba424a27b1c7b7e263c0130178c75ac51782ae8b64' \
--header 'Content-Type: application/json' \
--data-raw '{}'
var myHeaders = new Headers();
myHeaders.append("X-Timestamp", "1731049239438");
myHeaders.append("X-Nonce", "2d3206fe-1edc-468c-bdd3-ff395603822f");
myHeaders.append(
  "Authorization",
  "ak_0f77303c96f584sa432fd:e66d26be984bb0rre6a617d8d1f023ee985210462384"
);
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: JSON.stringify({}),
  redirect: "follow",
};
fetch("https://api.chuangsiai.com/api/verify/signature", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log("error", error));
最后更新时间 2025/4/27 16:02:34