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 Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller client OS version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller client device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller 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 | Used 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
json
{
"mobile": "15200000000",
"type": "BIND_MOBILE_SMS",
"captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}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、Mobile 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_token | Captcha verification pass token | Yes | String | Captcha 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 Code | Error Codes | Chinese Error Message | English Error Message | Resolution |
|---|---|---|---|---|
| 400 | IDAAS.SDK.PARAM.0001 | 设备信息不完整 | Device information is incomplete | Please check whether the input device information is complete |
| 400 | IDAAS.SDK.PARAM.0002 | clientId不能为空 | clientId cannot be empty | Please check whether the input clientId is empty |
| 400 | IDAAS.SDK.PARAM.0003 | 应用未注册,请先注册应用 | The app is not registered, please register the app first | Please check whether the input clientId is correct |
| 400 | IDAAS.SDK.USER.0004 | 手机号不能为空 | Mobile number cannot be empty | Please check whether the input mobile number is empty |
| 400 | IDAAS.SDK.PARAM.0007 | 发送场景不能为空 | Send scene cannot be empty | Please check whether the input send scenario is empty |
| 400 | IDAAS.SDK.PARAM.0008 | 图形验证码校验通过令牌不能为空 | Graphic verification code verification pass token cannot be empty | Please check whether the input captcha verification pass token is empty |
| 400 | IDAAS.SDK.CAPTCHA.0003 | 图形验证码校验通过令牌已失效 | Graphic verification code verification passed the token has been invalid | Please obtain and verify the graphic captcha again before calling |
| 400 | IDAAS.SDK.CAPTCHA.0004 | 图形验证码校验通过令牌校验失败 | Graphic verification code verification passed token verification failed | The input token is inconsistent with the token returned by verify captcha |
| 400 | IDAAS.SDK.CAPTCHA.0005 | 未知的发送场景 | Unknown sending scenario | Please check whether the input send scenario is correct |
| 400 | IDAAS.SDK.CAPTCHA.0006 | 验证码发送失败 | Failed to send verification code | Please check whether the input items are correct and call again |