Steps to integrate captcha
The image below shows the integration process of GeeTest CAPTCHA v3. Please follow the sequence to integrate the service.
Step 1. Get your captcha ID and KEY
If you don’t have a GeeTest account, please firstly get your GeeTest account.
If you already have a GeeTest account, please sign in and enter GeeTest captcha dashboard. Click +New captcha to add a new captcha. Then, you will get a set of unique captcha ID and KEY . You can modify the security setting in the dashboard.
The following is an example of captcha ID and KEY.ID(07df3141a35**********19a473d7c50),
KEY(543b19036ef********8e07d121b81e9)
Step 2. Integrate server SDK
Server SDK provides two APIs for the client, i.e. API1 and API2. Please check the Server SDK integration for the detailed explanation and examples.
What to check:
- Whether
API1
andAPI2
could be accessed successfully. If you callAPI2
, it will returnfail
. Please replace the URLs with the URLs that you assign toAPI1
andAPI2
(see the example below). If error reports when you call the API2 and read thesession
, please comment out thesession
.
API1: |
Step 3. Integrate client SDK
The client SDK support Web, iOS and Android. You can find the detailed explanation and example in Client Integration.
What to check:
- Whether
API1
could be successfully accessed. If theAPI1
could return thechallenge
, captcha was successfully initialized. - Whether the captcha challenge could pop out.
- Whether users could interact with CAPTCHA. After users pass the challenge, a sign of “verification succeeded” will pop out.
- If you call the API2, it will return 3 variables
geetest_challenge
,geetest_validate
andgeetest_seccode
. - After you call the
API2
, you can find in the browser console or through package capture that the request has been sent successfully.
Step 4. Check the API2
This step aims to check if the API2
can correctly verify whether the captcha has been passed.
What to check:
The Server successfully receives API2 request from Client and get three variables, including
geetest_challenge
,geetest_validate
andgeetest_seccode
.After Server calls the method in the SDK, it returns data to Client, which can correctly indicate whether the verification is successful.
The Client successfully receives the returned result of API2 and executes the corresponding process according to the returned result.
Step 5. Fallback mode simulation
Failback mode is an emergency solution for downtime. GeeTest’s captcha is designed to provide a stable and secure service. In some unavoidable case or force majeure, Failback mode could be used to ensure normal operation in downtime.
The available status of GeeTest cloud server (gt_server_status
) is stored in the session
of API1
and can be returned to client with success
. The client could use success
to decide whether to perform the Failback mode. The API2
can get gt_server_status
from session
and decide to get the secondary verification result from local or GeeTest cloud server.
How to simulate the Failback mode?
Please fill in an incorrect string (e.g. 123456789) for the captcha ID. Then, it will enter the Failback mode.
What to check:
- Check if the verification process is correct in Fallback mode.