All Products
Search
Document Center

Drive and Photo Service:ImportUser

Last Updated:May 15, 2026

Imports a user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/user/import HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

body

object

No

The request body parameters.

authentication_type

string

Yes

The authentication type. Valid values are:

  • mobile: a mobile number.

  • email: an email address.

  • ding: a DingTalk account.

  • ram: an Alibaba Cloud RAM sub-account.

  • wechat: a WeCom account.

  • ldap: an LDAP account.

  • custom: a custom account.

mobile

identity

string

Yes

The unique identifier for the user.

130****

authentication_display_name

string

No

The display name of the authentication method.

10000

extra

string

No

Extra information.

If authentication_type is mobile, this parameter specifies the country code. The default is 86.

1

nick_name

string

Yes

The nickname of the user.

pdsuer

auto_create_drive

boolean

No

Specifies whether to automatically create a drive for the user.

false

drive_total_size

integer

No

The total size of the drive. The value must be an integer that is greater than or equal to -1. A value of -1 indicates an unlimited size.

10240

parent_group_id

string

No

The ID of the group to add the user to.

g12

Response elements

Element

Type

Description

Example

User

The user information.

Examples

Success response

JSON format

{
  "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",
  "creator": "user1",
  "last_login_time": 0,
  "last_refresh_token_time": 0,
  "user_data": {
    "key": ""
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.