Mobile + SMS Verification Code Registration API
API Description
Call this API when using form registration with SMS verification.
Request Description
Request Headers
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| X-operating-sys-version | Caller operating system 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) AppleWebKit/605.1.15(KHTML, like Gecko) Mobile/15E148/HuaWei-AnyOffice/2.6.1802.0010/com.huawei.cloudlink.workplace |
| X-L | Used for internationalization language setting | No | String | zh |
| X-client-id | Application authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
Request Example
json
{
"user_name": "zhangsan",
"name": "Zhang San",
"mobile": "15201657315",
"verify_code": "1234",
"email": "15201657315@qq.com",
"pwd": "QWE@qwe123",
"head_img": "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIQ8QOTSn3y4cYHLlMC3sv6RCBmeMkxtOog47Zr3v2Afbqc2bmP0WibUIUskX39eJlJ",
"attr_gender":"male",
"attr_birthday": "2022-02-17",
"attr_nick_name": "Zhang San",
"mailing_address": "Wuhan, Hubei",
"zip_code": "430000",
"first_name": "zhangsan",
"middle_name": "zhangsan",
"last_name": "zhangsan",
"industry": "Public institution",
"extension": {
"age":"18"
}
}Request Parameters
| Parameter Name | 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 | Received verification code. To obtain the verification code, see 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: 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 | Extension attribute | No | JSONObject | Extended attributes need to be defined in the admin center |
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"status": "SUCCESS",
"expire": 43200,
"session_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa",
"id_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa.xsdasd.sdasdas"
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "SDK.COMMON.1001",
"error_msg": "Parameter X-client-id cannot be left blank."
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| status | Returned result | String | Possible values for 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 a 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 |