Skip to content

Send Email Verification Code ​

This document introduces the API for sending email verification codes.Before calling the email 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
{
    "email": "zhangsan@qq.com",
    "type": "UPDATE_EMAIL_EMS",
    "captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}

Request Parameters ​

Parameter NameChinese NameRequiredTypeDescription
emailEmailYesStringEmail
typeSend scenarioYesStringScenario type
REGISTER_EMS: Social account register and bind mobile/email API、Register by Email and Verification Code
LOGIN_EMS: Email and Email Verification Code Login
FORGET_PWD_EMS: Forgot password via email
BIND_EMAIL_EMS: Social account login bind mobile or email
UPDATE_PWD_EMS: Change personal password via email
UPDATE_EMAIL_EMS: Change email
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