Client initialization errors
Initialization API error codes
The CAPTCHA initialization API sends a request that contains a user tag to obtain CAPTCHA resources. The request domain is xxxxx.captcha-open.aliyuncs.com, where xxxxx is the user tag. To learn how to obtain a user tag, see Activate the CAPTCHA service. A successful initialization request returns a response similar to the following example:
{
"CaptchaType": "INPAINTING",
"CertifyId": "axxx",
"Code": "Success",
"DeviceConfig": "0NtwB5Lb4R602aF1IO1CHB1qKWQndQ1qXjwNGcoZH1NlVqy+VBr2wtb/Nb0n74tj/zuzGL+3a80pCT09GbHBTY+p13...",
"Image": "qst/aigc/online/2/22b4e2a9-6229-4679-a8da-8f214f9722c9/inpainted_with_mask.png",
"LimitFlow": false,
"Message": "success",
"PuzzleImage": "qst/aigc/online/2/22b4e2a9-6229-4679-a8da-8f214f9722c9/bitwise_and_result.png",
"RequestId": "3xxx0",
"StaticPath": "1xxx",
"Success": true
}
If an initialization request fails, see the table below for error descriptions and troubleshooting suggestions.
|
Error code |
Description |
|
IllegalUserTag |
The user tag (prefix) parameter is invalid. Refer to Activate the CAPTCHA service to verify that the parameter is passed correctly. Important
The IllegalUserTag error code applies only to Web and H5 client integration and app client integration. It does not apply to WeChat mini program integration. |
|
IllegalCertifyId |
The format of the custom |
|
IllegalScene |
The |
|
Forbidden.AccountAccessDenied |
The account has an overdue payment. Check your account status and resolve any outstanding payments. |
|
Throttling |
The API call is rate-limited because the number of queries per second (QPS) has exceeded the product limit. If you require a higher business capacity, you can purchase additional QPS. The new limit does not take effect immediately. Contact your account manager at least two days in advance to configure the new limit. |
|
ThrottlingByStrategy |
The initialization request is rate-limited to block attackers who frequently send requests to iterate through the CAPTCHA challenge library. |
Initialization parameter validation errors
Initialization parameter validation errors apply only to Web and H5 client integration and app client integration. They do not apply to WeChat mini program integration.
Before the client sends a CAPTCHA initialization request, the SDK validates the initialization parameters. If a parameter is invalid, the SDK reports an error in the browser developer tools console. The following table describes the validation details.
|
Field |
Error message |
Example |
|
General type validation |
The data type of the input parameter is invalid. Refer to Parameter description and pass a value of the correct type. |
For example, if you pass the string 'false' for the immediate parameter, the following error is reported:
|
|
language |
The value of the language parameter is invalid. For more information, see Languages supported by Captcha 2.0. |
For example, if you pass 'abc' for the language parameter, the following error is reported:
|
|
region |
The value of the region parameter is invalid. See the region parameter documentation for details. |
For example, if you pass 'zh' for the region parameter, the following error is reported:
|
|
mode |
The value of the mode parameter is invalid. The supported values are popup and embed. See the mode parameter documentation for details. |
For example, if you pass 'popout' for the mode parameter, the following error is reported:
|
|
element/button |
The value of the element or button parameter is invalid. Ensure the parameter value is the ID of an existing element on the page. |
For example, if you pass 'abc' for the element or button parameter but no element with the ID "abc" exists on the page, the following error is reported:
|