---
title: Seedance · Person verification
description: "Create a session, complete H5, query the verified group and manage its assets."
outline: [2, 3]
pageClass: video-api-reference seedance-v2-reference
---

# Person verification

For person verification, follow: server creates a session → user completes H5 → server queries GroupId → manage materials. Ordinary video generation can start directly with [quick start](./).

::: info Request conventions
Use `https://api.tokenlio.ai`, `Authorization: Bearer $TOKENLIO_API_KEY` and a JSON body. Verification Actions use POST and PascalCase fields. Version is optional, default `2024-01-01`. See [request conventions](./conventions).
:::

## 1. Create a session {#create-session}

Call `CreateVisualValidateSession`. Required `CallbackURL` accepts up to8192 characters. Optional `ProjectName` is1–128 characters and defaults to `default`. Set a stable `TOKENLIO_VISUAL_KEY` for this new session; retain the original key/body when recovering an uncertain outcome.

```bash
curl -sS --fail-with-body "https://api.tokenlio.ai/?Action=CreateVisualValidateSession&Version=2024-01-01" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ${TOKENLIO_VISUAL_KEY:?Set a stable session key}" \
  --data '{
    "CallbackURL": "https://customer.example/verify-return?state=RANDOM_STATE",
    "ProjectName": "default"
  }'
```

Example successful `Result`:

```json
{
  "BytedToken": "OPAQUE_TOKEN",
  "H5Link": "https://example.com/verify?token=OPAQUE_TOKEN",
  "CallbackURL": "https://customer.example/verify-return?state=RANDOM_STATE"
}
```

On your server, associate BytedToken with this user and state. Keep the token opaque: do not modify it, log it or store it in public environment files. Give the user H5Link unchanged.

## 2. Complete H5 and return in the browser {#verification-return}

The user opens H5Link in a browser and completes verification. Do not attach platform Authorization or replace this step with an HTTP client inheriting API authentication.

Set CallbackURL to a browser return page you control. Generate, store and validate random state in your application, matching the return to the user and this BytedToken. Never put the platform Key in the URL.

The H5 return may append `resultCode`; `10000` indicates verification passed. Use it for UI feedback, then query the result on your server before using GroupId. A page-loading failure does not prove H5 failure, and a successful redirect alone is not authorization proof.

CallbackURL is a browser return. Video-generation server notifications use [callback_url](./callbacks). For manual testing, use an accessible HTTPS page you control, complete H5 and then query the result.

## 3. Query the verified group {#get-result}

After the user completes H5, call `GetVisualValidateResult` with the original platform Key, ProjectName and BytedToken. The opaque token accepts up to4096 characters.

```bash
curl -sS --fail-with-body "https://api.tokenlio.ai/?Action=GetVisualValidateResult&Version=2024-01-01" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "BytedToken": "OPAQUE_TOKEN",
    "ProjectName": "default"
  }'
```

Successful `Result`:

```json
{
  "GroupId": "GROUP_ID"
}
```

Check HTTP, `ResponseMetadata.Error` and `Result.Error`. If verification is incomplete or returns an error, do not infer GroupId from an empty response or automatically create another session. Follow [errors and recovery](./errors).

## 4. Use the verified material group {#use-group}

Use GroupId as CreateAsset's parent group. GetAssetGroup takes `Id` in its body. List verified groups with `Filter.GroupType=LivenessFace`:

```bash
curl -sS --fail-with-body "https://api.tokenlio.ai/api/v3/assets?Action=ListAssetGroups" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "ProjectName": "default",
    "Filter": {
      "GroupType": "LivenessFace"
    },
    "PageNumber": 1,
    "PageSize": 10
  }'
```

Follow [material management](./assets) to create and query assets, then use `asset://ASSET_ID` in [video generation](./generation) when ready. Ordinary CreateAssetGroup does not establish completed person verification.

## Next steps

- [Material groups and assets](./assets)
- [Errors, retries and recovery](./errors#operation-recovery)
- [Agent integration guide](./agent)

## Official references

- [CreateVisualValidateSession](https://docs.volcengine.com/docs/ark/h5-create-visual-validate-session-api?lang=zh)
- [GetVisualValidateResult](https://docs.volcengine.com/docs/ark/asset-group-id-get-visual-validate-result-api?lang=zh)
