Get User Information

GET /user/info/:user_id

Get User Information

Headers

  • Authorization string Required

    Bearer Token

Path parameters

  • user_id integer Required

    User ID

Responses

  • 200 application/json

    Get User Information Successful

    Hide response attributes Show response attributes object
    • code integer
    • msg string
    • data object
      Hide data attributes Show data attributes object
      • username string
      • email string
      • phone_number string
      • we_avatar string
  • 400 application/json

    Get User Information Request Failed

    Hide response attributes Show response attributes object
    • code integer
    • msg string
    • data object
      Hide data attributes Show data attributes object
      • username string
      • email string
      • phone_number string
      • we_avatar string
GET /user/info/:user_id
curl \
 -X GET http://127.0.0.1:8888/user/info/:user_id \
 -H "Authorization: token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJJRCI6MSwic3ViIjoidG9rZW4iLCJleHAiOjE3MTAxNTQ4NjUsImlhdCI6MTcxMDA2ODQ2NSwianRpIjoiYWU4MGMzZDItYzFkNC00ZjA3LWI5MmYtNTExZWM1NGY0MmE3In0.Of1bm7GAbETd_H_shrLAheWSRABfjfl624Q3A8-_iRcELKWnAYni8gqC9UhK26-M3VKnS3hpUrBKzqO9UDULWQ;refresh_token eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJJRCI6MSwic3ViIjoicmVmcmVzaF90b2tlbiIsImV4cCI6MTcxMDMyNzY2NSwiaWF0IjoxNzEwMDY4NDY1LCJqdGkiOiJhZTgwYzNkMi1jMWQ0LTRmMDctYjkyZi01MTFlYzU0ZjQyYTcifQ.xEHofsIZIVSAKrPwt6YGCIx9PYBmLZEUMw54VrmfWxc92SDV51CLqIvhy3YkTV05to64POPPhTRUK8EErAvJlA"
Response examples (200)
{
  "code": 200,
  "msg": "获取用户信息成功",
  "data": {
    "username": "fanxing",
    "email": "admin@lolicdn.top",
    "phone_number": "110",
    "we_avatar": "https://q1.qlogo.cn/g?b=qq&nk=430240479&s=640"
  }
}
Response examples (400)
{
  "code": 400,
  "msg": "参数错误",
  "data": {
    "username": "string",
    "email": "string",
    "phone_number": "string",
    "we_avatar": "string"
  }
}