All Products
Search
Document Center

Drive and Photo Service:GetUser

Last Updated:Aug 04, 2025

Queries 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/get HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

user_idstringNo

The user ID. If you use an AccessKey pair to access Drive and Photo Service, you must specify this parameter. If you use an access token to access Drive and Photo Service, you do not need to specify this parameter, and Drive and Photo Service automatically finds the user ID contained in the access token.

c9b7a5aa04d14ae3867fdc886fa01da4

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.