---
title: "Get user by user name."
method: GET
path: "/user/{username}"
tags: ["user"]
---

# Get user by user name.

`GET /user/{username}`

Get user detail based on username.

## Path parameters

- `username` string, required

## Response `200`

successful operation

- User
  - `id` integer
  - `username` string
  - `firstName` string
  - `lastName` string
  - `email` string
  - `password` string
  - `phone` string
  - `userStatus` integer — User Status

## Other responses

- `400` — Invalid username supplied
- `404` — User not found
- `default` — Unexpected error

## Changes

- **2025-03-12** `253de9e0f0ae` — 1 breaking, 8 warning, 2 info
  - removed the media type `application/xml` for the response with the status `default`
  - removed the optional property `email` from the response with the `default` status
  - removed the optional property `firstName` from the response with the `default` status
  - removed the optional property `id` from the response with the `default` status
  - …7 more

[Change history](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/changes/user/:username/get.md)

---

[API](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0.md) · [All operations](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swagger/swagger-petstore-openapi-3-0/revisions/e1a2480ffa44/schema)
