## Get user by user name

`client.users.retrieve(stringusername, RequestOptionsoptions?): User`

**get** `/user/{username}`

Get user by user name

### Parameters

- `username: string`

### Returns

- `User`

  - `id?: number`

  - `email?: string`

  - `firstName?: string`

  - `lastName?: string`

  - `password?: string`

  - `phone?: string`

  - `username?: string`

  - `userStatus?: number`

    User Status

### Example

```typescript
import RpTestDocs1 from 'rp-test-docs-1';

const client = new RpTestDocs1({
  apiKey: process.env['PETSTORE_API_KEY'], // This is the default and can be omitted
});

const user = await client.users.retrieve('username');

console.log(user.id);
```

#### Response

```json
{
  "id": 10,
  "email": "john@email.com",
  "firstName": "John",
  "lastName": "James",
  "password": "12345",
  "phone": "12345",
  "username": "theUser",
  "userStatus": 1
}
```
