Polyv Help Center

Help Center

Watch Conditions - CAPTCHA Verification

Updated: 2025-06-20 14:16:28

1. Configuration Information

1.1 CAPTCHA Watch Condition Settings

Interface: AuthSettingItemCode

Property Description Type
authType Condition type Code
enabled Whether enabled null | YN
privacyContent Privacy notice content string
privacyStatus Whether privacy notice is enabled YN
codeAuthTips Welcome title string
codeEntryText Entry text null | string
qcodeImg QR code image URL string
qcodeTips QR code prompt text string

2. Usage

2.1 Verify CAPTCHA Watch

API Method: verifyCodeAuth(params: VerifyCodeAuthParams): Promise<VerifyCodeAuthResult>

Parameter Description:

  • params: Call parameters, VerifyCodeAuthParams type, required, detailed type description as follows
Parameter Description Type Required Default
code Verification code string Yes -
imageId Image ID string Yes -
captcha Image CAPTCHA string Yes -

Return Value Description: Authorization result, Promise<VerifyCodeAuthResult> type

Example:

// 执行验证码授权
async function toDoAuthCode(code) {
  const result = await watchCore.auth.verifyCodeAuth({
    code,
  });
  if (result.success) {
    await handleAuthVerifySuccess(result);
  } else {
    await handleAuthVerifyFail(result);
  }
}

// 传入验证码
toDoAuthCode('1234');
联系客服,在线咨询