Register by Email and Verification Code
Call this API when using form registration and email verification.
Request Description
Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller OS version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller 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
{
"user_name": "zhangsan",
"name": "张三",
"mobile": "15200000000",
"email": "15200000000@qq.com",
"verify_code": "1234",
"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"
}
}Request Parameters
WARNING
Note: In addition to required parameters, other parameters should refer to whether the fields inIDaaSIDaaS user attribute definition are required
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| user_name | Username | No | String | |
| name | Name | No | String | |
| mobile | Mobile number | No | String | |
| Yes | String | |||
| verify_code | Email verification code | Yes | String | For obtaining the verification code, seeSend Email Verification Code API type=REGISTER_EMS |
| pwd | Password | No | String | |
| head_img | Avatar (URL) | No | String | |
| attr_gender | Gender | No | String | Optional values: 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 | Zip 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 | Extended attributes | No | JSONObject | Extended attributes need to be defined in the enterprise |
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"status": "SUCCESS",
"expire": 43200,
"session_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa",
"id_token": "eyJ0NiJ9.eyJ1cI6IjIifX0.DeWt4QuZXso"
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "IDAAS.SDK.USER.0005",
"error_msg": "E-mail cannot be empty"
}Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| status | Return result | String | Possible values returned by this field are as follows: SUCCESS: login successful ACCESS_DENIED: access denied |
| expire | session_token validity period | Number | session_token validity period,Within the validity period, session_token can be used to obtain ticket |
| session_token | User session_token | String | User session_token; this token can be used to call IDaaS APIs to obtain sso_ticket, which can be exchanged for user information |
| id_token | Short-term valid API call token | String | This field is in JWT format and contains user identity information. Refer toGet User Info from id_tokento obtain user information. The token validity period is5minutes by default and can be configured |
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. PARAM.0009 | 验证码不能为空 | Verification code cannot be empty | Please check whether the input verification code is empty |
| 400 | IDAAS.SDK.USER.0004 | 手机号不能为空 | Mobile number cannot be empty | Please check whether the input mobile number is empty |
| 400 | IDAAS.SDK.CAPTCHA.0007 | 验证码不正确 | Incorrect verification code | Please check whether the input verification code is correct |
| 400 | IDAAS.SDK.USER.0002 | 用户名不能为空 | Username cannot be empty | Please check whether the username field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0003 | 姓名不能为空 | Name cannot be empty | Please check whether the name field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0005 | 邮箱不能为空 | E-mail cannot be empty | Please check whether the email field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0007 | 性别不能为空 | Gender cannot be empty | Please check whether the gender field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0008 | 生日不能为空 | Birthday cannot be empty | Please check whether the birthday field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0009 | 昵称不能为空 | Nick name cannot be empty | Please check whether the nickname field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0010 | 邮寄地址不能为空 | Mailing address cannot be empty | Please check whether the mailing address field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0011 | 邮政编码不能为空 | Zip code cannot be empty | Please check whether the zip code field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0012 | 名字不能为空 | First name cannot be empty | Please check whether the first name field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0013 | 中间名不能为空 | Middle name cannot be empty | Please check whether the middle name field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0014 | 姓氏不能为空 | Last name cannot be empty | Please check whether the last name field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0015 | 所属行业不能为空 | Industry cannot be empty | Please check whether the industry field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0017 | 扩展属性{0}不能为空 | Extended property {0} cannot be empty | Please check whether the extended attribute{0}field in the input parameters is empty |
| 400 | IDAAS.SDK.USER.0018 | 用户名不符合校验规则 | The username does not meet the verification rules | Please check whether the username field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the username field |
| 400 | IDAAS.SDK.USER.0019 | 姓名不符合校验规则 | The name does not meet the verification rules | Please check whether the name field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the name field |
| 400 | IDAAS.SDK.USER.0020 | 手机号不符合校验规则 | The phone number does not meet the verification rules | Please check whether the mobile number field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the mobile number field |
| 400 | IDAAS.SDK.USER.0021 | 邮箱不符合校验规则 | The e-mail does not meet the verification rules | Please check whether the email field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the email field |
| 400 | IDAAS.SDK.USER.0023 | 性别不符合校验规则 | The gender does not meet the verification rules | Please check whether the gender field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the gender field |
| 400 | IDAAS.SDK.USER.0024 | 生日不符合校验规则 | The birthday does not meet the verification rules | Please check whether the birthday field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the birthday field |
| 400 | IDAAS.SDK.USER.0025 | 昵称不符合校验规则 | The nickname does not meet the verification rules | Please check whether the nickname field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the nickname field |
| 400 | IDAAS.SDK.USER.0026 | 邮寄地址不符合校验规则 | The mailing address does not meet the verification rules | Please check whether the mailing address field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the mailing address field |
| 400 | IDAAS.SDK.USER.0027 | 邮政编码不符合校验规则 | The zip code does not meet the verification rules | Please check whether the zip code field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the birthday field |
| 400 | IDAAS.SDK.USER.0028 | 名字不符合校验规则 | The first name does not meet the verification rules | Please check whether the first name field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the first name field |
| 400 | IDAAS.SDK.USER.0029 | 中间名不符合校验规则 | The middle name does not meet the verification rules | Please check whether the middle name field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the middle name field |
| 400 | IDAAS.SDK.USER.0030 | 姓氏不符合校验规则 | The last name does not meet the verification rules | Please check whether the last name field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the last name field |
| 400 | IDAAS.SDK.USER.0031 | 所属行业不符合校验规则 | The industry does not meet the verification rules | Please check whether the industry field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the industry field |
| 400 | IDAAS.SDK.USER.0033 | 扩展属性{0}不符合校验规则 | The extended attribute {0} does not meet the verification rules | Please check whether the extended attribute {0} field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the extended attribute {0} field |
| 400 | IDAAS.SDK.MOBILE.0002 | 未经认证的手机号 | An unauthenticated cell phone number | Please check whether [Enterprise Center - Enterprise Configuration - International Area Code Configuration] complies with the configuration rules |
| 400 | IDAAS.SDK.USER.0034 | 用户名已存在 | Username already exists | Please check whether the user exists |
| 400 | IDAAS.SDK.USER.0035 | 手机号已存在 | Phone number already exists | Delete the mobile number and re-add it, or change to a mobile number that has not been added. |
| 400 | IDAAS.SDK.USER.0036 | 邮箱已存在 | Email already exists | Delete the email and re-add it, or change to an email that has not been added. |
| 400 | IDAAS.SDK.USER.0037 | 扩展属性{0}已存在 | Extended property {0} already exists | Delete the extended attribute {0} and re-add it, or change to an extended attribute {0} that has not been added. |