Imports a user.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
POST /v2/user/import HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request parameters. | |
| authentication_type | string | Yes | The authentication type. Valid values:
| mobile |
| identity | string | Yes | The unique identifier. | 130**** |
| authentication_display_name | string | No | The display name of the authentication type. | 10000 |
| extra | string | No | The additional information. If authentication_type is set to mobile, set this parameter to a country code. If you do not specify this parameter, 86 is used by default. | 1 |
| nick_name | string | Yes | The nickname of the user. | pdsuer |
| auto_create_drive | boolean | No | Specifies whether to automatically create a drive. | false |
| drive_total_size | long | No | The size of the drive. The value cannot be smaller than -1. A value of -1 specifies that the size is unlimited. | 10240 |
| parent_group_id | string | No | The ID of the group to which the user is added. | g12 |
Response parameters
Examples
Sample success responses
JSONformat
{
"domain_id": "bj1",
"user_id": "c9b7a5aa04d14ae3867fdc886fa01da4",
"avatar": "http://aa.com/1.jpg",
"created_at": 1639762579768,
"updated_at": 1639762579768,
"email": "a@aliyunpds.com",
"nick_name": "001",
"phone": 13900001111,
"role": "user",
"status": "enabled",
"user_name": "pds",
"description": "vipuser",
"default_drive_id": 1,
"user_data": {
"key": ""
},
"creator": "user1",
"punishments": [
{
"punish_flag": 0,
"starts_at": "",
"ends_at": "",
"impermanent": true
}
],
"is_sync": true
}Error codes
For a list of error codes, visit the Service error codes.
