Get Image Captcha API
Initializes the image captcha for human-machine verification. Before sending an SMS or email verification code, human-machine verification must be completed to determine whether the request comes from a real user. The API interaction flow is as follows: 
Request Description
Request Headers
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| X-operating-sys-version | Caller operating system version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller IP | No | String | 192.168.1.2 |
| X-agent | User-Agent information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15(KHTML, like Gecko) Mobile/15E148/HuaWei-AnyOffice/2.6.1802.0010/com.huawei.cloudlink.workplace |
| X-L | Used for internationalization language setting | No | String | zh |
| X-client-id | Application authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
Request Parameters
None
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"captchaId": null,
"projectCode": null,
"captchaOriginalPath": null,
"captchaFontType": null,
"captchaFontSize": null,
"secretKey": "yMXC583dP4R7uhmq",
"originalImageBase64": "iVBORw0KGgoAAAANSUhEUgAAATYABj/WRVk78AAAAASUVORK5CYII=",
"point": null,
"jigsawImageBase64": "iVBORw0KGgoAAAANSUhEUgADcAAAAASUVORK5CYII=",
"wordList": null,
"pointList": null,
"pointJson": null,
"token": "389c21b32a8e4eba9a6d75b71150bfd1",
"result": false,
"captchaVerification": null
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "SDK.COMMON.1001",
"error_msg": "Parameter X-client-id cannot be left blank."
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| captchaId | Captcha ID | String | Captcha ID |
| projectCode | String | ||
| captchaOriginalPath | String | ||
| captchaFontType | String | ||
| captchaFontSize | String | ||
| secretKey | String | ||
| originalImageBase64 | Original image base64 | String | Original image base64 |
| point | Slider point coordinates | String | Slider point coordinates |
| jigsawImageBase64 | Jigsaw image base64 | String | Jigsaw image base64 |
| wordList | Click-select text | String | Click-select text |
| pointList | Click-select coordinates | String | Click-select coordinates |
| pointJson | Coordinates (transmitted via base64 encryption) | String | Coordinates (transmitted via base64 encryption) |
| token | token (unique identifier of the captcha for each request) | String | token (unique identifier of the captcha for each request) |
| result | Verification result | String | Verification result |
| captchaVerification | Backend secondary verification parameter | String | Backend secondary verification parameter |