A AuthMS API Wiki API Reference iam.tianv.com →

GET /internal/thirdparty/captcha/challenge

根据指定提供者类型生成CAPTCHA挑战数据,PoW类型返回随机挑战码和难度值,Turnstile类型返回Site Key,用于前端初始化验证组件并开始人机验证流程

第三方验证 `bearerAuth` application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
provider query string No pow enum: `pow`, `turnstile` 验证提供者类型(pow / turnstile)
scope query string No default 应用范围标识,用于区分不同业务页面或场景的挑战
difficulty query integer No PoW挑战难度值,数值越大计算难度越高(仅对pow类型有效)

Responses

StatusDescriptionSchema
200挑战生成成功,返回挑战ID、类型、挑战数据和过期时间dto.DataResponse-captcha_Challenge
400请求参数错误(不支持的验证提供者类型)dto.SimpleResponse
429CAPTCHA挑战请求过于频繁,请稍后重试dto.SimpleResponse
500挑战生成服务不可用dto.SimpleResponse

Referenced Schemas

captcha.Challenge

FieldTypeRequiredExampleConstraintsDescription
data captcha.ChallengeData No
expires_at string No
id string No
site_key string No
type string No

captcha.ChallengeData

FieldTypeRequiredExampleConstraintsDescription
challenge string No
difficulty integer No

dto.DataResponse-captcha_Challenge

FieldTypeRequiredExampleConstraintsDescription
code integer No
data captcha.Challenge No
message string No
timestamp string No

dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No