# Find current user.

`GET /api/user/me`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  },
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Parameters:

- `relations` (query, array, optional)
  Type: array
  
  Items:
    Type: string

- `includeEmployee` (query, boolean, optional)
  Type: boolean

- `includeOrganization` (query, boolean, optional)
  Type: boolean

Responses:

- 200: Found current user

Content type: application/json

Type: object

Schema: [User](https://sourcey-gauzy.pages.dev/api-reference/models/user/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `thirdPartyId` (optional)
  Type: string

- `firstName` (optional)
  Type: string

- `lastName` (optional)
  Type: string

- `email` (optional)
  Type: string
  
  minLength: 3
  
  maxLength: 100

- `phoneNumber` (optional)
  Type: string
  
  minLength: 4
  
  maxLength: 12

- `username` (optional)
  Type: string
  
  minLength: 3
  
  maxLength: 20

- `timeZone` (optional)
  Type: string

- `timeFormat` (optional)
  Type: string
  
  enum: [12,24]

- `hash` (optional)
  Type: string

- `refreshToken` (optional)
  Type: string

- `imageUrl` (optional)
  Type: string
  
  maxLength: 500

- `preferredLanguage` (optional)
  Type: string
  
  enum: ["en","bg","he","ru","fr","es","zh","de","pt","it","nl","pl","ar"]

- `preferredComponentLayout` (optional)
  Type: string
  
  enum: ["CARDS_GRID","TABLE"]

- `uiPreferences` (optional)
  Type: object

- `code` (optional)
  Type: string

- `codeExpireAt` (optional)
  Type: string, date-time

- `emailVerifiedAt` (optional)
  Type: string, date-time

- `lastLoginAt` (optional)
  Type: string, date-time

- `emailToken` (optional)
  Type: string

- `roleId` (optional)
  Type: string

- `imageId` (optional)
  Type: string

- `defaultTeamId` (optional)
  Type: string

- `lastTeamId` (optional)
  Type: string

- `defaultOrganizationId` (optional)
  Type: string

- `lastOrganizationId` (optional)
  Type: string

- 401: Unauthorized

- 403: Forbidden

- 404: Record not found

## Examples

### cURL

```bash
curl -X GET 'http://localhost:3000/api/user/me' \
  -H 'Authorization: Bearer YOUR_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/user/me', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
  },
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get(
    'http://localhost:3000/api/user/me',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
    },
)
print(response.text)
```
