reallife_asset/wwwroot/api/check_validate.dspy
yumoqing 86d2c4edc4 docs: add curl examples to all external APIs
- rl_verify.dspy: vendor param for creating verify session
- rl_upload.dspy: upload asset to vendor_group
- rl_status.dspy: query asset processing status
- rl_assets.dspy: list assets by vendor_group_id
- sync_assets.dspy: sync assets from vendor
- check_validate.dspy: check verify result with apikey/secretkey
2026-05-30 12:24:35 +08:00

28 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================
# 检查真人认证结果(获取 vendor_group_id
# 参数: group_id(必填, 本地 rl_asset_group.id),
# apikey(必填), secretkey(必填)
# 返回: {success, message, vendor_group_id}
# curl 示例:
# curl -X POST 'https://ai.atvoe.com/reallife_asset/api/check_validate.dspy' \
# -H 'Authorization: Bearer YOUR_TOKEN' \
# -d 'group_id=LOCAL_GROUP_ID&apikey=YOUR_AK&secretkey=YOUR_SK'
# ============================================================
group_id = params_kw.get('group_id', '')
apikey = params_kw.get('apikey', '')
secretkey = params_kw.get('secretkey', '')
if not group_id:
return {"success": False, "message": "group_id 不能为空"}
if not apikey or not secretkey:
return {"success": False, "message": "请提供供应商 API Key"}
dbname = get_module_dbname('reallife_asset')
db = DBPools()
async with db.sqlorContext(dbname) as sor:
recs = await sor.R("rl_asset_group", {"id": group_id})
vendor = recs[0].vendor if recs else "volcengine"
result = await rl_check_validate_result(group_id, vendor, apikey=apikey, secretkey=secretkey)
return result