Scenario management
After enabling Captcha 2.0, you must create a verification scenario to use the service.
Prerequisites
You have enabled Alibaba Cloud Captcha 2.0.
Create a verification scenario
After you create a verification scenario, you can obtain the Scenario ID to integrate and use Captcha 2.0.
When creating a verification scenario, we recommend first setting the Rule Status to Test Mode. This bypasses risk policy checks and only verifies that the integration is working correctly, which prevents your integration tests from being mistakenly flagged as bot activity.
After you complete the integration and confirm that it works correctly, you must change the Rule Status of the scenario to Official Release. This allows Captcha 2.0 to evaluate risks and defend against attacks.
-
In the left navigation pane, click Scenarios. On the Scenarios page, click Create Scenario.
-
In the Create Scenario panel, configure the following parameters and click OK.
Parameter
Description
Scenario Name
Enter a name for the new verification scenario.
The name must be 1 to 32 characters long and can contain Chinese characters, uppercase and lowercase letters, digits, and underscores (_).
Integration Method
Select the integration method for Captcha 2.0. The options are:
-
Web/H5: If you select this option, you must integrate Captcha 2.0 on the client and server. For more information, see Web and H5 Integration.
-
Webview+H5 (for App/Mini Program): If you select this option, you must integrate Captcha 2.0 on the client, server, and in your app. For more information, see App Client Integration and Mini Program Integration.
-
WeChat Mini Program Native Plugin: If you select this option, you must integrate Captcha 2.0 on the client. For more information, see WeChat Mini Program Integration V2 Architecture.
Note-
Custom policies are not supported for WeChat Mini Program integration.
-
You can use the same scenario ID for multiple services that share the same integration method. However, you must create different scenarios for services that use different integration methods.
-
The integration method is tightly coupled with the default security policy. If the configured integration method does not match your actual implementation, verification will fail. Confirm this setting carefully.
-
Important: You cannot change the integration method once selected. If you select the wrong method, you must delete the scenario and create a new one.
Verification Type
Select a verification type. The options are:
-
Invisible CAPTCHA: This is a non-interactive verification process.
If you select this option, a silent verification secondary challenge is initiated. The Additional Challenge supports One-click CAPTCHA, Slider CAPTCHA, Puzzle Verification, and Image Restoration.
ImportantSilent verification does not support the embedded (embed) display mode. Use the pop-up (popup) mode for integration.
-
One-click CAPTCHA: Click a button to complete the verification.
-
Slider CAPTCHA: Drag the slider to complete the verification.
-
Puzzle Verification: Drag the slider to complete the jigsaw puzzle.
-
Image Restoration: Drag the slider to restore the image.
Rule Status
Set the status for the new verification scenario. The options are:
-
Official Release (Default): In production mode, Captcha 2.0 assesses risks for verification requests and returns a verification result to defend against attacks.
-
Test Mode: In test mode, Captcha 2.0 only checks if the integration is working correctly and does not evaluate risks. It returns a preset verification result. After testing is complete, you must switch back to Official Release mode. The change takes about five minutes to take effect.
In test mode, you can set the following verification results for different Verification Type combinations:
-
Invisible CAPTCHA + One-click CAPTCHA or Slider CAPTCHA (secondary challenge): Pass Invisible CAPTCHA, Fail Invisible CAPTCHA and Pass Additional Challenge, Fail Invisible CAPTCHA and Additional Challenge.
-
Invisible CAPTCHA + Puzzle Verification or Image Restoration (secondary challenge): Pass Invisible CAPTCHA, Fail Invisible CAPTCHA.
-
One-click CAPTCHA: Pass Verification, Fail Verification.
-
Slider CAPTCHA: Pass Verification, Fail Verification.
-
Jigsaw verification: Pass Verification, Fail Verification.
-
Image Restoration: Pass Verification, Fail Verification.
-
ImportantBilling is based on the number of calls, regardless of whether the Rule Status is set to Official Release or Test Mode.
-
-
After you create the verification scenario, find it in the list and copy its Scenario ID for client-side integration. In the Actions column for the scenario, you can click integration guide, Edit, custom policy, or Delete. A notification in the upper-right corner of the page indicates that you will be billed for more than three scenarios.
Other operations
-
Integration guide
Click Actions in the Integration Guide column of the target scenario to view integration steps and code examples.
-
Edit
Click Actions in the Modify column of the target scenario to modify its scenario name, verification type, and policy status.
-
Custom policy
Click Actions in the Custom Policy column of the target scenario to configure custom settings. For more information, see Custom policy.
-
Delete
Click Actions in the Delete column of the target scenario. In the Confirm Delete dialog box, enter the Scenario ID, select the risk acknowledgement checkbox, and click OK.
WarningCaution: Deleting a verification scenario permanently removes all historical data, which cannot be recovered. Calls to the Captcha 2.0 service using this configuration will also fail. Ensure that you no longer need the verification scenario before you delete it.