Customer Identity (CIAM)
Register with Mobile Number + SMS Verification Code
Call this interface when registering via form and using SMS verification.
# Request Description
POST https://{your_domain}/api/v2/sdk/register/mobile-verify-code
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Calling Client OS 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
{
"user_name": "zhangsan",
"name": "张三",
"mobile": "15200000000",
"verify_code": "1234",
"email": "15200000000@qq.com",
"pwd": "QWE@qwe123",
"head_img": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIQ8QOTSn3y4cYHLlMC3sv6RCBmeMkxtOog47Zr3v2Afbqc2bmP0WibUIUskX39eJlJ",
"attr_gender": "male",
"attr_birthday": "1992-02-17",
"attr_nick_name": "张三",
"mailing_address": "湖北省武汉市",
"zip_code": "430000",
"first_name": "zhangsan",
"middle_name": "zhangsan",
"last_name": "zhangsan",
"industry": "事业单位",
"extension": {
"age": "18"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Note: Except for required parameters, other parameters need to refer to the field mandatory configuration in the IDaaS user attribute definition.
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| user_name | Username | No | String | |
| name | Name | No | String | |
| mobile | Mobile Number | Yes | String | |
| verify_code | SMS Verification Code | Yes | String | For obtaining the verification code, please refer to the Send SMS Verification Code API type=REGISTER_SMS |
| No | String | |||
| pwd | Password | No | String | |
| head_img | Avatar (URL) | No | String | |
| attr_gender | Gender | No | String | Optional values are: female: Female; male: Male; unknow: Confidential |
| attr_birthday | Birthday | No | String | Format: yyyy-MM-dd |
| attr_nick_name | Nickname | No | String | |
| mailing_address | Mailing Address | No | String | |
| zip_code | Postal Code | No | String | |
| first_name | First Name | No | String | |
| middle_name | Middle Name | No | String | |
| last_name | Last Name | No | String | |
| industry | Industry | No | String | |
| extension | Extension Attributes | No | JSONObject | Extended attributes need to be defined within the enterprise. |
# Return Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "SUCCESS",
"expire": 43200,
"session_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa",
"id_token": "eyJ0NiJ9.eyJ1cI6IjIifX0.DeWt4QuZXso"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "IDAAS.SDK.USER.0035",
"error_msg": "Phone number already exists"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Return Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| status | Return Result | String | This field may return the following values: SUCCESS Login successful ACCESS_DENIED Access denied |
| expire | session_token Validity Period | Number | session_token validity period, within which the session_token can be used to obtain a ticket |
| session_token | User session_token | String | User session_token, which can be used to call IDaaS interfaces to obtain an sso_ticket, which can be exchanged for user information |
| id_token | Short-term valid, interface call token | String | This field is in JWT format and contains user identity information. Refer to Obtaining User Information from id_token to get user information. The token validity period defaults to 5 minutes and is configurable. |
# Error Codes
| Status Code | Error Code | Error Message | Handling Measures |
|---|---|---|---|
| 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. PARAM.0009 | Verification code cannot be empty | Please check if the input verification code is empty |
| 验证码不能为空 | |||
| 400 | IDAAS.SDK.USER.0004 | Mobile number cannot be empty | Please check if the input mobile number is empty |
| 手机号不能为空 | |||
| 400 | IDAAS.SDK.CAPTCHA.0007 | Incorrect verification code | Please check if the input verification code is correct |
| 验证码不正确 | |||
| 400 | IDAAS.SDK.USER.0002 | Username cannot be empty | Please check if the username field in the input parameters is empty |
| 用户名不能为空 | |||
| 400 | IDAAS.SDK.USER.0003 | Name cannot be empty | Please check if the name field in the input parameters is empty |
| 姓名不能为空 | |||
| 400 | IDAAS.SDK.USER.0005 | E-mail cannot be empty | Please check if the email field in the input parameters is empty |
| 邮箱不能为空 | |||
| 400 | IDAAS.SDK.USER.0007 | Gender cannot be empty | Please check if the gender field in the input parameters is empty |
| 性别不能为空 | |||
| 400 | IDAAS.SDK.USER.0008 | Birthday cannot be empty | Please check if the birthday field in the input parameters is empty |
| 生日不能为空 | |||
| 400 | IDAAS.SDK.USER.0009 | Nick name cannot be empty | Please check if the nickname field in the input parameters is empty |
| 昵称不能为空 | |||
| 400 | IDAAS.SDK.USER.0010 | Mailing address cannot be empty | Please check if the mailing address field in the input parameters is empty |
| 邮寄地址不能为空 | |||
| 400 | IDAAS.SDK.USER.0011 | Zip code cannot be empty | Please check if the zip code field in the input parameters is empty |
| 邮政编码不能为空 | |||
| 400 | IDAAS.SDK.USER.0012 | First name cannot be empty | Please check if the first name field in the input parameters is empty |
| 名字不能为空 | |||
| 400 | IDAAS.SDK.USER.0013 | Middle name cannot be empty | Please check if the middle name field in the input parameters is empty |
| 中间名不能为空 | |||
| 400 | IDAAS.SDK.USER.0014 | Last name cannot be empty | Please check if the last name field in the input parameters is empty |
| 姓氏不能为空 | |||
| 400 | IDAAS.SDK.USER.0015 | Industry cannot be empty | Please check if the industry field in the input parameters is empty |
| 所属行业不能为空 | |||
| 400 | IDAAS.SDK.USER.0017 | Extended property {0} cannot be empty | Please check if the extended property {0} field in the input parameters is empty |
| 扩展属性{0}不能为空 | |||
| 400 | IDAAS.SDK.USER.0018 | The username does not meet the verification rules | Please check if the username field in the input parameters complies with the validation rules for the username field in [Enterprise Center - User - User Attribute Definition] |
| 用户名不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0019 | The name does not meet the verification rules | Please check if the name field in the input parameters complies with the validation rules for the name field in [Enterprise Center - User - User Attribute Definition] |
| 姓名不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0020 | The phone number does not meet the verification rules | Please check if the mobile number field in the input parameters complies with the validation rules for the mobile number field in [Enterprise Center - User - User Attribute Definition] |
| 手机号不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0021 | The e-mail does not meet the verification rules | Please check if the email field in the input parameters complies with the validation rules for the email field in [Enterprise Center - User - User Attribute Definition] |
| 邮箱不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0023 | The gender does not meet the verification rules | Please check if the gender field in the input parameters complies with the validation rules for the gender field in [Enterprise Center - User - User Attribute Definition] |
| 性别不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0024 | The birthday does not meet the verification rules | Please check if the birthday field in the input parameters complies with the validation rules for the birthday field in [Enterprise Center - User - User Attribute Definition] |
| 生日不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0025 | The nickname does not meet the verification rules | Please check if the nickname field in the input parameters complies with the validation rules for the nickname field in [Enterprise Center - User - User Attribute Definition] |
| 昵称不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0026 | The mailing address does not meet the verification rules | Please check if the mailing address field in the input parameters complies with the validation rules for the mailing address field in [Enterprise Center - User - User Attribute Definition] |
| 邮寄地址不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0027 | The zip code does not meet the verification rules | Please check if the zip code field in the input parameters complies with the validation rules for the birthday field in [Enterprise Center - User - User Attribute Definition] |
| 邮政编码不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0028 | The first name does not meet the verification rules | Please check if the first name field in the input parameters complies with the validation rules for the first name field in [Enterprise Center - User - User Attribute Definition] |
| 名字不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0029 | The middle name does not meet the verification rules | Please check if the middle name field in the input parameters complies with the validation rules for the middle name field in [Enterprise Center - User - User Attribute Definition] |
| 中间名不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0030 | The last name does not meet the verification rules | Please check if the last name field in the input parameters complies with the validation rules for the last name field in [Enterprise Center - User - User Attribute Definition] |
| 姓氏不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0031 | The industry does not meet the verification rules | Please check if the industry field in the input parameters complies with the validation rules for the industry field in [Enterprise Center - User - User Attribute Definition] |
| 所属行业不符合校验规则 | |||
| 400 | IDAAS.SDK.USER.0033 | The extended attribute {0} does not meet the verification rules | Please check if the extended attribute {0} field in the input parameters complies with the validation rules for the extended attribute {0} field in [Enterprise Center - User - User Attribute Definition] |
| 扩展属性{0}不符合校验规则 | |||
| 400 | IDAAS.SDK.MOBILE.0002 | An unauthenticated cell phone number | Please check if [Enterprise Center - Enterprise Configuration - International Area Code Configuration] complies with the configuration rules |
| 未经认证的手机号 | |||
| 400 | IDAAS.SDK.USER.0034 | Username already exists | Please check if the user exists |
| 用户名已存在 | |||
| 400 | IDAAS.SDK.USER.0035 | Phone number already exists | Delete the mobile number and re-add it or replace it with a mobile number that has not been added before. |
| 手机号已存在 | |||
| 400 | IDAAS.SDK.USER.0036 | Email already exists | Delete the email and re-add it or replace it with an email that has not been added before. |
| 邮箱已存在 | |||
| 400 | IDAAS.SDK.USER.0037 | Extended property {0} already exists | Delete the extended property {0} and re-add it or replace it with an extended property {0} that has not been added before. |
| 扩展属性{0}已存在 |
I'm ready. Please provide the Markdown content you need translated.
