All Products
Search
Document Center

Drive and Photo Service:ImportUser

Last Updated:Aug 04, 2025

Imports a user.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/user/import HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

authentication_typestringYes

The authentication type. Valid values:

  • mobile: mobile number.
  • email: email address.
  • ding: DingTalk account.
  • ram: Alibaba Cloud Resource Access Management (RAM) user.
  • wechat: WeCom account.
  • ldap: Lightweight Directory Access Protocol (LDAP) account.
  • custom: custom account.
mobile
identitystringYes

The unique identifier.

130****
authentication_display_namestringNo

The display name of the authentication type.

10000
extrastringNo

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_namestringYes

The nickname of the user.

pdsuer
auto_create_drivebooleanNo

Specifies whether to automatically create a drive.

false
drive_total_sizelongNo

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_idstringNo

The ID of the group to which the user is added.

g12

Response parameters

ParameterTypeDescriptionExample
User

The information about the user.

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.