跳到主要内容

用户注册

用于创建用户

请求地址

  • API地址(请求URI): /openapi/v1/user/signup

请求参数

| 参数名称 | 类型 | 要求 | 描述
| |-----------------|------------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | userId | String | R | User ID, unique identifier for each user, limited to 64 characters | | userName | String | R | User name, the name of the user, limited to 50 characters | | email | String | R | User email address, used for communication and login, limited to 100 characters | | password | String | R | User password, for account security, limited to 20 characters | | dateOfBirth | Date | O | User date of birth, optional field | | phoneNumber | String | O | User phone number, optional field, limited to 20 characters | | address | String | O | User address, optional field, limited to 255 characters | | city | String | O | User city, optional field, limited to 50 characters | | country | String | O | User country, optional field, limited to 50 characters | | postalCode | String | O | User postal code, optional field, limited to 20 characters | | profilePicture | String | O | URL of the user's profile picture, optional field | | registrationDate| Date | R | Date of user registration, required field |

Sample request

{
"bizName": "MFT",
"channelName": "",
"countryIds": "HK",
"ip": "61.93.232.102",
"password": "XM6i/reK/8Yd14hPYsvwbtP7a4zWZ0m43+5MzuuXfD2RnU0NOCMmZiRHua7YsePAP4iBdUKGuER1hf5jhxZwXwmsh41+TBgsR46fKKW889Tdx4upmQVNlP7oquQAeqNHVxRzyfaBGSWEciaTjzPopGrQf5TnFEKBpAvINZ/m1yc=",
"phoneNumberPrefix": "852",
"phoneNumber": "98763237",
"timeZone": "UTC+8:00"
}

响应参数

参数名称类型描述
idLongPrimary key
uidStringUUID
bizCodeStringBusiness code
bizNameStringBusiness name
identificationLevelIntegerAuthentication level
nicknameStringNickname generated based on phone number or email
phoneNumberPrefixIntegerPhone number prefix
phoneNumberStringPhone number
emailStringEmail address
loginType (Deprecated)StringType of login (deprecated)
registerTypeStringType of registration (1- phone, 2- email, 3- one-click login)
passwordStringPassword
birthdayLocalDateDate of birth
countryIdStringCountry/Region ID
countryStringCountry name
surnameStringSurname
middleNameStringMiddle name
givenNameStringGiven name
fullNameStringFull name
idTypeIdStringID type ID
idNumberStringID number
idTypeStringID type
channelIdStringChannel ID
inviterCodeStringInviter's invitation code
inviterNameStringInviter's name
customerManagerStringAssigned customer manager
cityStringCity
addressStringAddress
streetStringStreet
houseNumberStringHouse number
timeZoneStringUser time zone
createTimeLocalDateTimeCreation time
updateTimeLocalDateTimeLast update time (including password update)
openAccountTimeLocalDateTimeAccount opening time
userTypeTestIntegerWhether it is a test account (0- no, 1- yes)
grayScaleIntegerWhether it is a gray-scale account (0- no, 1- yes)
statusIntegerStatus (0- disabled, 1- enabled)
registerIpStringIP address at registration
lastLoginIpStringIP address of the last login
lastLoginTimeLocalDateTimeTime of the last login
lastLoginCountryStringCountry of the last login
registerSourceIntegerRegistration source (0- user self-registration, 1- CRM admin registration) Trust business has special use, changing from 0 to 1 after customer manager supplements information

示例响应

{
"code": "0",
"msg": "ok",
"data": {
"id": 139061,
"uid": "75b8ccad23f342c1a519718c7fb6c041",
"bizCode": "98227698",
"bizName": "MFT",
"identificationLevel": null,
"nickname": "98****37",
"phoneNumberPrefix": 852,
"phoneNumber": "98793237",
"email": null,
"loginType": "1",
"registerType": "1",
"password": "536e0a39a107e1319ad3894db4800410356af68313d16931",
"birthday": null,
"countryId": "HK",
"country": "中国香港特别行政区",
"surname": null,
"middleName": null,
"givenName": null,
"fullName": null,
"idTypeId": null,
"idNumber": null,
"idType": null,
"channelId": null,
"inviterCode": null,
"inviterName": null,
"customerManager": null,
"city": null,
"address": null,
"street": null,
"houseNumber": null,
"timeZone": "UTC+8:00",
"createTime": "2024-12-11T11:07:19.438744618",
"updateTime": "2024-12-11T11:07:19.443132556",
"openAccountTime": null,
"userTypeTest": null,
"grayScale": null,
"status": null,
"registerIp": "61.93.232.102",
"lastLoginIp": "61.93.232.102",
"lastLoginTime": null,
"lastLoginCountry": "中国香港特别行政区",
"registerSource": null
},
"success": true
}

示例代码

  public static void main(String[] args) {
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"bizName\": \"MFT\",\r\n \"channelName\": \"\",\r\n \"countryIds\": \"HK\",\r\n \"ip\": \"61.93.232.102\",\r\n \"password\": \"XM6i/reK/8Yd14hPYsvwbtP7a4zWZ0m43+5MzuuXfD2RnU0NOCMmZiRHua7YsePAP4iBdUKGuER1hf5jhxZwXwmsh41+TBgsR46fKKW889Tdx4upmQVNlP7oquQAeqNHVxRzyfaBGSWEciaTjzPopGrQf5TnFEKBpAvINZ/m1yc=\",\r\n \"phoneNumberPrefix\": \"852\",\r\n \"phoneNumber\": \"98793237\",\r\n \"timeZone\": \"UTC+8:00\"\r\n}");
Request request = new Request.Builder()
.url("https://test-gateway.mcconnects.com/mc-crm/openapi/v1/user/signup")
.method("POST", body)
.addHeader("token", "59f0e2da9d0040b8befa8e70b24645a4")
.addHeader("Content-Type", "application/json")
.addHeader("Cookie", "token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjEsImRldmljZSI6ImRlZmF1bHQtZGV2aWNlIiwiZWZmIjotMSwicm5TdHIiOiJYUkVaUERWdWVnNmFpYUUyTjIwS3hYVXVsaGlXdGdWTiIsInVzZXJNZXJjaGFudElkcyI6IioiLCJwZXJtaXNzSWQiOjEwMDAxLCJ1c2VybmFtZSI6ImFkbWluIn0.iXq5Kc1kHPhjm1mauj9vto8PD5A9dP-V5t3y2hp5FGI")
.build();
Response response = client.newCall(request).execute();
}