Get Captcha
This document introduces the API for initializing the graphic captcha for human-machine verification.Before sending SMS or email verification codes, human-machine verification must be completed to distinguish real users. The API interaction flow is as follows: 
Request Description
Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller client OS version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller client device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller client 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) |
| X-L | Used for internationalization language setting | No | String | zh |
| X-client-id | Application authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| content-type | Content format type | Yes | String | application/json |
Request Example
None
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": "IDAAS.SDK.PARAM.0001",
"error_msg": " Device information is incomplete"
}Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| captchaId | Verification code ID | String | Verification code 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 | Slider image base64 | String | Slider image base64 |
| wordList | Point-selection text | String | Point-selection text |
| pointList | Point-selection coordinates | String | Point-selection coordinates |
| pointJson | Point coordinates (base64 encrypted transmission) | String | Point coordinates (base64 encrypted transmission) |
| token | token (unique identifier for each captcha request) | String | token (unique identifier for each captcha request) |
| result | Verification result | String | Verification result |
| captchaVerification | Backend secondary verification parameter | String | Backend secondary verification parameter |
Error Codes
| Status Code | Error Codes | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | IDAAS.SDK.PARAM.0001 | 设备信息不完整 | Device information is incomplete | Please check whether the input device information is complete |
| 400 | IDAAS.SDK.PARAM.0002 | clientId不能为空 | clientId cannot be empty | Please check whether the input clientId is empty |
| 400 | IDAAS.SDK.PARAM.0003 | 应用未注册,请先注册应用 | The app is not registered, please register the app first | Please check whether the input clientId is correct |
| 400 | IDAAS.SDK.COM.0002 | 系统繁忙,请稍后再试 | System busy, please try again later | Please call again or contact BambooCloud staff |