Customer Identity (CIAM)
Send SMS Verification Code
This document introduces the content related to calling the Send SMS Verification Code API. Before calling the SMS verification code API, human-machine verification must be completed through a graphical captcha. For details, please refer to Obtaining Graphical Captcha.
# Request Description
POST https://{your_domain}/api/v2/sdk/sms/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
{
"mobile": "15200000000",
"type": "BIND_MOBILE_SMS",
"captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}
1
2
3
4
5
6
2
3
4
5
6
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| mobile | Mobile Number | Yes | String | Mobile Number |
| type | Send Scenario | Yes | String | Scenario Type REGISTER_SMS: Mobile Verification Code Registration、Bind Mobile or Register User LOGIN_SMS: Mobile Verification Code Login FORGET_PWD_SMS: Forgot Password UPDATE_PWD_SMS: Change Personal Password via Mobile Number (mobile includes full area code) UPDATE_MOBILE_SMS: Update Mobile Number BIND_MOBILE_SMS: Bind Mobile to User |
| captcha_token | CAPTCHA Verification Pass Token | Yes | String | CAPTCHA Verification Pass Token For obtaining 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
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 does not match the token returned in 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 |
| 验证码发送失败 |
I understand. Please provide the Markdown content you need translated. I will follow all the specified rules.
