Skip to content

Register by Email and Verification Code

Call this API when using form registration and email verification.

Request Description

Request Headers

Parameter NameChinese NameRequiredTypeExample
X-operating-sys-versionCaller OS versionYesStringwindows10.1.1
X-device-fingerprintCaller device fingerprintYesString156aysdna213sc50
X-device-ipCaller IPNoString192.168.1.2
X-agentUser-Agent informationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X)
X-LUsed for internationalization language settingNoStringzh
X-client-idApplication authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
content-typeContent format typeYesStringapplication/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 NameChinese NameRequiredTypeDescription
user_nameUsernameNoString
nameNameNoString
mobileMobile numberNoString
emailEmailYesString
verify_codeEmail verification codeYesStringFor obtaining the verification code, seeSend Email Verification Code API type=REGISTER_EMS
pwdPasswordNoString
head_imgAvatar (URL)NoString
attr_genderGenderNoStringOptional values: female:female; male:male; unknow:confidential
attr_birthdayBirthdayNoStringFormat: yyyy-MM-dd
attr_nick_nameNicknameNoString
mailing_addressMailing addressNoString
zip_codeZip codeNoString
first_nameFirst nameNoString
middle_nameMiddle nameNoString
last_nameLast nameNoString
industryIndustryNoString
extensionExtended attributesNoJSONObjectExtended 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 NameChinese NameTypeDescription
statusReturn resultStringPossible values returned by this field are as follows:
SUCCESS: login successful
ACCESS_DENIED: access denied
expiresession_token validity periodNumbersession_token validity period,Within the validity period, session_token can be used to obtain ticket
session_tokenUser session_tokenStringUser session_token; this token can be used to call IDaaS APIs to obtain sso_ticket, which can be exchanged for user information
id_tokenShort-term valid API call tokenStringThis 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 CodeError CodesChinese Error MessageEnglish Error MessageResolution
400IDAAS.SDK.PARAM.0001设备信息不完整Device information is incompletePlease check whether the input device information is complete
400IDAAS.SDK.PARAM.0002clientId不能为空clientId cannot be emptyPlease check whether the input clientId is empty
400IDAAS.SDK.PARAM.0003应用未注册,请先注册应用The app is not registered, please register the app firstPlease check whether the input clientId is correct
400IDAAS.SDK. PARAM.0009验证码不能为空Verification code cannot be emptyPlease check whether the input verification code is empty
400IDAAS.SDK.USER.0004手机号不能为空Mobile number cannot be emptyPlease check whether the input mobile number is empty
400IDAAS.SDK.CAPTCHA.0007验证码不正确Incorrect verification codePlease check whether the input verification code is correct
400IDAAS.SDK.USER.0002用户名不能为空Username cannot be emptyPlease check whether the username field in the input parameters is empty
400IDAAS.SDK.USER.0003姓名不能为空Name cannot be emptyPlease check whether the name field in the input parameters is empty
400IDAAS.SDK.USER.0005邮箱不能为空E-mail cannot be emptyPlease check whether the email field in the input parameters is empty
400IDAAS.SDK.USER.0007性别不能为空Gender cannot be emptyPlease check whether the gender field in the input parameters is empty
400IDAAS.SDK.USER.0008生日不能为空Birthday cannot be emptyPlease check whether the birthday field in the input parameters is empty
400IDAAS.SDK.USER.0009昵称不能为空Nick name cannot be emptyPlease check whether the nickname field in the input parameters is empty
400IDAAS.SDK.USER.0010邮寄地址不能为空Mailing address cannot be emptyPlease check whether the mailing address field in the input parameters is empty
400IDAAS.SDK.USER.0011邮政编码不能为空Zip code cannot be emptyPlease check whether the zip code field in the input parameters is empty
400IDAAS.SDK.USER.0012名字不能为空First name cannot be emptyPlease check whether the first name field in the input parameters is empty
400IDAAS.SDK.USER.0013中间名不能为空Middle name cannot be emptyPlease check whether the middle name field in the input parameters is empty
400IDAAS.SDK.USER.0014姓氏不能为空Last name cannot be emptyPlease check whether the last name field in the input parameters is empty
400IDAAS.SDK.USER.0015所属行业不能为空Industry cannot be emptyPlease check whether the industry field in the input parameters is empty
400IDAAS.SDK.USER.0017扩展属性{0}不能为空Extended property {0} cannot be emptyPlease check whether the extended attribute{0}field in the input parameters is empty
400IDAAS.SDK.USER.0018用户名不符合校验规则The username does not meet the verification rulesPlease check whether the username field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the username field
400IDAAS.SDK.USER.0019姓名不符合校验规则The name does not meet the verification rulesPlease check whether the name field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the name field
400IDAAS.SDK.USER.0020手机号不符合校验规则The phone number does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0021邮箱不符合校验规则The e-mail does not meet the verification rulesPlease check whether the email field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the email field
400IDAAS.SDK.USER.0023性别不符合校验规则The gender does not meet the verification rulesPlease check whether the gender field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the gender field
400IDAAS.SDK.USER.0024生日不符合校验规则The birthday does not meet the verification rulesPlease check whether the birthday field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the birthday field
400IDAAS.SDK.USER.0025昵称不符合校验规则The nickname does not meet the verification rulesPlease check whether the nickname field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the nickname field
400IDAAS.SDK.USER.0026邮寄地址不符合校验规则The mailing address does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0027邮政编码不符合校验规则The zip code does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0028名字不符合校验规则The first name does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0029中间名不符合校验规则The middle name does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0030姓氏不符合校验规则The last name does not meet the verification rulesPlease 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
400IDAAS.SDK.USER.0031所属行业不符合校验规则The industry does not meet the verification rulesPlease check whether the industry field in the input parameters complies with the rules in [Enterprise Center - User - User Attribute Definition] for the industry field
400IDAAS.SDK.USER.0033扩展属性{0}不符合校验规则The extended attribute {0} does not meet the verification rulesPlease 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
400IDAAS.SDK.MOBILE.0002未经认证的手机号An unauthenticated cell phone numberPlease check whether [Enterprise Center - Enterprise Configuration - International Area Code Configuration] complies with the configuration rules
400IDAAS.SDK.USER.0034用户名已存在Username already existsPlease check whether the user exists
400IDAAS.SDK.USER.0035手机号已存在Phone number already existsDelete the mobile number and re-add it, or change to a mobile number that has not been added.
400IDAAS.SDK.USER.0036邮箱已存在Email already existsDelete the email and re-add it, or change to an email that has not been added.
400IDAAS.SDK.USER.0037扩展属性{0}已存在Extended property {0} already existsDelete the extended attribute {0} and re-add it, or change to an extended attribute {0} that has not been added.

BambooCloud IDaaS Open Platform