EasyRouterEasyRouter
User GuideAPI DocsConnect Agent Tools
Management APIReal-Person Verification & Asset Management

Create Liveness Session

Important: h5_link Field Requires Unicode Escape Decoding

The link in the returned h5_link field contains Unicode escape sequences (e.g., \u0026 instead of &). You must decode these Unicode escapes before using the link, otherwise it may fail to open correctly.

Example: https://kyc.byteintl.com/?accessKeyId=***\u0026secretAccessKey=*** → after decoding → https://kyc.byteintl.com/?accessKeyId=***&secretAccessKey=***

Recommended decode methods:

  • Python: h5_link.encode().decode('unicode_escape')
  • JavaScript: JSON.parse('"' + h5_link + '"')
  • Go: strconv.Unquote('"' + h5_link + '"')
POST
/api/resource-channel/byteplus/visual-validate/sessions

Authorization

BearerAuth

AuthorizationBearer <token>

API Key (sk-xxxxxx)

In: header

Request Body

application/json

callback_url?string

The publicly accessible redirect URL after verification completion, e.g., https://easyrouter.io/v1/callback

Response Body

application/json

curl -X POST "https://easyrouter.io/api/resource-channel/byteplus/visual-validate/sessions" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "message": "",
  "data": {
    "session_id": "20260521162915BF9DC22A7A65ADF905D8",
    "byted_token": "20260521162915BF9DC22A7A65ADF905D8",
    "h5_link": "https://kyc.byteintl.com/?accessKeyId=***&secretAccessKey=***&sessionToken=***&configId=8f0851cb-9869-4524-ba83-42cc6582ba79&bytedToken=20260521162915BF9DC22A7A65ADF905D8",
    "callback_url": "https://easyrouter.io/v1/callback",
    "channel_id": 9,
    "status": "pending",
    "raw_response": "{\"ResponseMetadata\":{\"Action\":\"CreateVisualValidateSession\",\"Region\":\"ap-southeast-1\",\"RequestId\":\"20260521162915DFB89755D1A21AAE8036\",\"Service\":\"ark\",\"Version\":\"2024-01-01\"},\"Result\":{\"BytedToken\":\"20260521162915BF9DC22A7A65ADF905D8\",\"CallbackURL\":\"https://easyrouter.io/v1/callback\",\"H5Link\":\"https://kyc.byteintl.com/?accessKeyId=***\\&secretAccessKey=***\\&sessionToken=***\\&configId=8f0851cb-9869-4524-ba83-42cc6582ba79\\&bytedToken=20260521162915BF9DC22A7A65ADF905D8\"}}",
    "expires_at": "2026-05-21T08:31:15.462797904Z",
    "created_at": "2026-05-21T08:29:15.462798158Z",
    "updated_at": "2026-05-21T08:29:15.46279823Z"
  }
}