Skip to content

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 NameChinese NameRequiredTypeExample
X-operating-sys-versionCaller client OS versionYesStringwindows10.1.1
X-device-fingerprintCaller client device fingerprintYesString156aysdna213sc50
X-device-ipCaller client IPNoString192.168.1.2
X-agentUser-Agent informationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X)
X-LUsed for internationalization language settingNoStringzh
X-client-idApplication authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
content-typeContent format typeYesStringapplication/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 NameChinese NameTypeDescription
captchaIdVerification code IDStringVerification code ID
projectCodeString
captchaOriginalPathString
captchaFontTypeString
captchaFontSizeString
secretKeyString
originalImageBase64Original image base64StringOriginal image base64
pointSlider point coordinatesStringSlider point coordinates
jigsawImageBase64Slider image base64StringSlider image base64
wordListPoint-selection textStringPoint-selection text
pointListPoint-selection coordinatesStringPoint-selection coordinates
pointJsonPoint coordinates (base64 encrypted transmission)StringPoint coordinates (base64 encrypted transmission)
tokentoken (unique identifier for each captcha request)Stringtoken (unique identifier for each captcha request)
resultVerification resultStringVerification result
captchaVerificationBackend secondary verification parameterStringBackend secondary verification parameter

Error Codes

Status CodeError CodesChinese Error MessageEnglish Error MessageResolution
400IDAAS.SDK.PARAM.0001设备信息不完整Device information is incompletePlease check whether the input device information is complete
400IDAAS.SDK.PARAM.0002clientId不能为空clientId cannot be emptyPlease check whether the input clientId is empty
400IDAAS.SDK.PARAM.0003应用未注册,请先注册应用The app is not registered, please register the app firstPlease check whether the input clientId is correct
400IDAAS.SDK.COM.0002系统繁忙,请稍后再试System busy, please try again laterPlease call again or contact BambooCloud staff

BambooCloud IDaaS Open Platform