All Products
Search
Document Center

Drive and Photo Service:UpdateUser

Last Updated:Aug 04, 2025

Modifies the information about 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/update HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

user_idstringYes

The user ID. The ID can be up to 64 characters in length and cannot contain a number sign (#).

c9b7a5aa04d14ae3867fdc886fa01da4
nick_namestringNo

The nickname of the user. The nickname can be up to 128 characters in length.

pdsuer
statusstringNo

The state of the user. Valid values:

  • disabled: The user is prohibited from logon.
  • enabled: The user is in a normal state.
enabled
rolestringNo

The role of the user. Valid values:

  • superadmin
  • admin
  • user
user
avatarstringNo

The URL of the profile picture.

If you specify the parameter in the HTTP URL format, the URL must start with http:// or https:// and can be up to 4 KB in size.

If you specify the parameter in the DATA URL format, the URL must start with data:// and be encoded in Base64. The URL can be up to 300 KB in size.

http://a.b.c/pds.jpg
descriptionstringNo

The description of the user. The description can be up to 1,024 characters in length.

phonestringNo

The mobile number of the user.

13900001111
emailstringNo

The email address of the user.

a@aliyunpds.com
user_dataobjectNo

The custom data. The data can be up to 1,024 characters in length.

stringNo

The custom data.

test
group_info_listarray<object>No

The information about the group.

objectNo
group_idstringNo

The group ID.

g123

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.