Feature overview
Sliding captcha from Alibaba Group uses a risk analysis engine to distinguish humans from bots. It intercepts automated threats to provide a secure and reliable business environment.
The following figure shows the sliding captcha on a client.

Sliding captcha workflow
The sliding captcha service works as follows.

-
After integrating the sliding captcha code into your application's client (web page) and server, the slider component activates on the specified client page.
Note-
When you integrate the sliding captcha code, the
appkeyandsceneparameter values must match the values from the corresponding captcha configuration on the console. Ensure these values are consistent between the frontend and the server. -
When testing different frontend styles, you can use the test parameters (
appkeyandscene) provided in the frontend integration documentation. After testing, you must restore the originalappkeyandscenevalues. Do not use test parameters in your production environment.
-
-
The user drags the slider to the end on the client (web page). This action automatically triggers the slider component's code, which sends a verification request to Alibaba Cloud servers to validate the operation.
-
Alibaba Cloud servers use risk control technology to assess the verification request and return the result to the application's client.
-
Verification successful: The client receives the callback result in the
callbackparameter of theNC_Optobject. -
Verification failed: The client displays a failure message and prompts the user to try the sliding captcha again.
-
-
The client sends the parameters required for signature verification (
param), along with the application's business request (such as login or registration), to your application server. You must implement this part according to your business logic.NoteThe parameters required for signature verification include
nc_token,data.csessionid, anddata.sig. We also recommend sending theappkeyandscenevalues from this slider's configuration to your application server. This enables the server to support multiple captcha configurations for different scenarios. -
Your application server calls the afs signature verification API, sending a request to Alibaba Cloud servers to validate the signature.
-
For Java, .NET, PHP, and Python, you can use the pre-packaged signature verification methods available in the SDK.
-
For other languages, you can call the signature verification API directly over HTTP.
-
-
Upon receiving the signature verification request, Alibaba Cloud servers verify it in real time.
Note-
To prevent attackers from collecting
sigvalues for batch attacks, the signature verification API parameters are valid for 10 minutes. -
To prevent replay attacks, the signature verification API parameters can be used only once. This means a signature verification request succeeds only on the first attempt.
-
-
Your application server receives the signature verification result and processes it according to your business logic.
-
A return code of 100 indicates that the signature verification was successful.
-
A return code of 900 indicates that the signature verification failed.
-
-
The application client receives the final verification result and proceeds according to your business logic.
Quick start
Use the following steps to integrate the sliding captcha service into your application.
The sliding captcha service supports only web applications on PCs and mobile devices (H5). If you want to deploy a captcha in a native app, you can use the Captcha 2.0 service. For more information, see What is Captcha 2.0?.
-
Log on to the Alibaba Cloud Captcha console and go to the Captcha > configuration management tab.
The page displays a list of existing configurations with columns such as Configuration Name, scene, Verification Method, service type, and scenario. Click add configuration in the upper-right corner. The Actions column provides links for customize style and System Code Integration.
-
Click add configuration.
NoteIf you have already created a sliding captcha configuration for the required scenario, you can reuse the existing configuration and its integration code.
Set Configuration Name, peak QPS, scenario, and service type. For Verification Method, select sliding captcha.
NotePeak QPS refers to the number of queries per second during your business's peak traffic periods.

-
Click Next.
NoteOnce a configuration is created, it is written to the live environment and cannot be modified or deleted. Please configure these settings carefully.
-
On the System Code Integration & Test page, securely save the automatically generated frontend and server integration code.
-
Integrate the provided code into your application's frontend and server.
After completing the configuration and integration, you can use Alibaba Cloud's latest bot detection technology to secure your business applications.
More features
After integrating the sliding captcha service into your application, you can also use the following features:
-
Customize style: On the configuration management tab of the Alibaba Cloud Captcha console, click customize style to set the look and feel of your sliding captcha component. For details, see Customize the frontend style.
-
Data monitoring: On the data monitoring tab of the Alibaba Cloud Captcha console, you can view your data overview. For details, see View data monitoring.