创建真人活体认证会话
curl --request POST \
--url https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"session_id": "<string>",
"h5_link": "<string>"
}
}真人认证与建组
创建真人活体认证会话
将 data.h5_link 提供给认证本人。电脑端可将链接展示为二维码供手机扫码打开;手机端可直接打开或跳转该链接。认证完成后使用同一 session_id 确认结果。真人组只能通过认证创建。
POST
/
api
/
resource-channel
/
byteplus
/
real-human-assets
/
verification
/
sessions
创建真人活体认证会话
curl --request POST \
--url https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://router.aionclaw.ai/api/resource-channel/byteplus/real-human-assets/verification/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"session_id": "<string>",
"h5_link": "<string>"
}
}使用 h5_link
data.h5_link 是本次真人活体认证的 H5 链接。将它提供给需要认证的本人,在手机端完成认证。
你可以根据用户当前设备选择以下方式:
- 用户正在使用电脑:将
h5_link生成二维码并展示在页面上,由本人使用手机扫码打开。 - 用户正在使用手机:直接跳转到
h5_link,或通过短信、站内消息等方式将链接发送给本人打开。
session_id 调用“确认真人认证结果”。
h5_link 仅用于本次认证流程。请勿将其写入公开日志、截图或不受控的分享渠道。如果收到的
h5_link 包含 Unicode 转义序列,例如 \u0026,请在跳转前将它解码为实际字符。未解码的链接可能无法正常打开。链接中未包含转义序列时,直接使用原值即可。https://example.com/?accessKeyId=***\u0026secretAccessKey=*** 解码后为 https://example.com/?accessKeyId=***&secretAccessKey=***。
常见语言的处理方式:
Python
decoded_h5_link = h5_link.encode().decode("unicode_escape")
JavaScript
const decodedH5Link = JSON.parse(`"${h5Link}"`);
Go
decodedH5Link, err := strconv.Unquote(`"` + h5Link + `"`)
session_id 调用“确认真人认证结果”。认证尚未完成时,请等待后重试同一个会话。