Get user details interface

Get the basic information and account details of a specified user, including username, contact information, account status, balance, and other related user data.

Points to note

  • This interface uses the GET method
  • Please provide the target user's ID to query user details
  • According to user permissions, you may only be able to view your own information or information of users you have permission to view
  • Return the basic information and account-related information of the user

Request address

{ๅŸŸๅๅœฐๅ€}/api/user/detail

Description:{ๅŸŸๅๅœฐๅ€}Replace it with your domain name, such ashttps://en.anqicms.com/api/user/detail

Request Syntax

GET {ๅŸŸๅๅœฐๅ€}/api/user/detail

Request Headers

This interface also involves common request headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Request parameters

Field name Type Required Description
userId int Is User ID, specify the user to be queried

Response header

This interface only involves public response headers. For more information, please refer toCommon Request Headers (Common Request Headers).

Return parameters

Field name Type Description
code int Error code
msg string Error description
data object User details data

data parameter

Field name Type Description
id int User ID
parent_id int Parent User ID
user_name string Username
real_name string Real Name
introduce string Personal introduction
avatar_url string Relative avatar image address
Full avatar URL string Complete avatar address
email string Email address
phone string Mobile number
group_id int user group ID
is_retailer int Is the user a distributor, 0-No, 1-Yes
balance int User Balance
Total Reward int Distributor Accumulated Earnings
Invite Code string User Invite Code
last login int timestamp of last login
expire time int Account expiration timestamp
created_time int registration timestamp
updated_time int update timestamp
status int User Display Status
extra object User Extended Information
group object User Group Information
link string User Personal Page Link

Usage Example

Request example

GET /api/user/detail?userId=1000 HTTP/1.1
Host: www.anqicms.com

Response Example

{
  "code": 0,
  "msg": "",
  "data": {
    "id": 1000,
    "parent_id": 0,
    "user_name": "admin",
    "real_name": "",
    "introduce": "่ฟ™ๆ˜ฏไป‹็ป",
    "avatar_url": "uploads/202211/21/14f56760596b5328.webp",
    "full_avatar_url": "http://127.0.0.1:8001/uploads/202211/21/14f56760596b5328.webp",
    "email": "",
    "phone": "",
    "group_id": 2,
    "status": 1,
    "is_retailer": 0,
    "balance": 0,
    "total_reward": 0,
    "invite_code": "anqicms",
    "last_login": 1702912236,
    "expire_time": 1997404800,
    "created_time": 1669012062,
    "updated_time": 1679536756,
    "extra": null,
    "group": null,
    "link": ""
  }
}

error code

Error code Description
0 OK
-1 Error, the reason is indicated in msg
1001 Not logged in
1002 Not authorized
200 API request OK