Customer Identity (CIAM)

Send Email Verification Code

This document introduces the content related to calling the send email verification code interface. Before calling the email verification code interface, human-machine verification must be completed through a graphical captcha. For details, please refer to Obtain Graphical Captcha.

# Request Description

POST https://{your_domain}/api/v2/sdk/email/send

# Request Headers

Parameter Name Chinese Name Required Type Example
X-operating-sys-version Calling Client Operating System Version Yes String windows10.1.1
X-device-fingerprint Calling Client Device Fingerprint Yes String 156aysdna213sc50
X-device-ip Calling 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 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

{
    "email": "zhangsan@qq.com",
    "type": "UPDATE_EMAIL_EMS",
    "captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}

1
2
3
4
5
6

# Request Parameters

Parameter Name Chinese Name Required Type Description
email Email Yes String Email
type Sending Scenario Yes String Scenario Type
REGISTER_EMS: Social Account Registration and Binding Phone Number or Email APIRegister via Email + Verification Code
LOGIN_EMS: Login via Email + Verification Code
FORGET_PWD_EMS: Forgot Password via Email
BIND_EMAIL_EMS: Social Account Login Binding Phone Number or Email
UPDATE_PWD_EMS: Change Personal Password via Email
UPDATE_EMAIL_EMS: Update Email
captcha_token CAPTCHA Verification Pass Token Yes String CAPTCHA Verification Pass Token
To get the verification code, please refer to Get CAPTCHA

# Return Example

Success Example:
HTTP/1.1 200 OK


Error Example:
HTTP/1.1 400 Bad Request
{
    "error_code": "IDAAS.SDK.CAPTCHA.0006",
    "error_msg": "Failed to send verification code"
}
1
2
3
4
5
6
7
8
9
10

# Return Parameters

None

# Error Codes

Status Code Error Code Error Message Handling Measure
400 IDAAS.SDK.PARAM.0001 Device information is incomplete Please check if the input device information is complete
设备信息不完整
400 IDAAS.SDK.PARAM.0002 clientId cannot be empty Please check if the input clientId is empty
clientId不能为空
400 IDAAS.SDK.PARAM.0003 The app is not registered, please register the app first Please check if the input clientId is correct
应用未注册,请先注册应用
400 IDAAS.SDK.USER.0004 Mobile number cannot be empty Please check if the input mobile number is empty
手机号不能为空
400 IDAAS.SDK.PARAM.0007 Send scene cannot be empty Please check if the input send scene is empty
发送场景不能为空
400 IDAAS.SDK.PARAM.0008 Graphic verification code verification pass token cannot be empty Please check if the input graphic verification code verification pass token is empty
图形验证码校验通过令牌不能为空
400 IDAAS.SDK.CAPTCHA.0003 Graphic verification code verification passed the token has been invalid Please re-obtain and verify the graphic verification code before calling
图形验证码校验通过令牌已失效
400 IDAAS.SDK.CAPTCHA.0004 Graphic verification code verification passed token verification failed The input token is inconsistent with the token returned from the graphic verification code verification
图形验证码校验通过令牌校验失败
400 IDAAS.SDK.CAPTCHA.0005 Unknown sending scenario Please check if the input send scene is correct
未知的发送场景
400 IDAAS.SDK.CAPTCHA.0006 Failed to send verification code Please check if the input items are correct and call again
验证码发送失败

Ready to proceed. Please provide the Markdown content you need translated.