Skip to content

Send SMS Verification Code

This document introduces the API for sending SMS verification codes.Before calling the SMS verification code API, human-machine verification must be completed through the graphic captcha,For details, seeGet Captcha

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

json
{
    "mobile": "15200000000",
    "type": "BIND_MOBILE_SMS",
    "captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}

Request Parameters

Parameter NameChinese NameRequiredTypeDescription
mobileMobile numberYesStringMobile number
typeSend scenarioYesStringScenario type
REGISTER_SMS: Mobile verification code registrationMobile bind or register user
LOGIN_SMS: Mobile verification code login
FORGET_PWD_SMS: Forgot password
UPDATE_PWD_SMS: Change personal password via mobile(mobilewith full area code)
UPDATE_MOBILE_SMS: Change mobile number
BIND_MOBILE_SMS: Mobile bind user
captcha_tokenCaptcha verification pass tokenYesStringCaptcha verification pass token
For obtaining the verification code, see Get Captcha

Response Example

Success Example

HTTP/1.1 200 OK

Error Example

HTTP/1.1 400 Bad Request

json
{
    "error_code": "IDAAS.SDK.CAPTCHA.0006",
    "error_msg": "Failed to send verification code"
}

Response Parameters

None

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.USER.0004手机号不能为空Mobile number cannot be emptyPlease check whether the input mobile number is empty
400IDAAS.SDK.PARAM.0007发送场景不能为空Send scene cannot be emptyPlease check whether the input send scenario is empty
400IDAAS.SDK.PARAM.0008图形验证码校验通过令牌不能为空Graphic verification code verification pass token cannot be emptyPlease check whether the input captcha verification pass token is empty
400IDAAS.SDK.CAPTCHA.0003图形验证码校验通过令牌已失效Graphic verification code verification passed the token has been invalidPlease obtain and verify the graphic captcha again before calling
400IDAAS.SDK.CAPTCHA.0004图形验证码校验通过令牌校验失败Graphic verification code verification passed token verification failedThe input token is inconsistent with the token returned by verify captcha
400IDAAS.SDK.CAPTCHA.0005未知的发送场景Unknown sending scenarioPlease check whether the input send scenario is correct
400IDAAS.SDK.CAPTCHA.0006验证码发送失败Failed to send verification codePlease check whether the input items are correct and call again

BambooCloud IDaaS Open Platform