---
source_url: https://www.pubnub.com/docs/chat/chat-sdk/build/features/users/details
title: Manage user details
updated_at: 2026-06-19T11:34:37.937Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Manage user details

Retrieve user details from your app.

## Get user details

`getUser()` returns data about a specific user, including all custom metadata by default.

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) in the [Admin Portal](https://admin.pubnub.com/) to store user data.
:::

### Method signature

##### Under the hood

`getUser()` calls App Context API and the JavaScript SDK [getUUIDMetadata()](https://www.pubnub.com/docs/sdks/javascript/api-reference/objects#get-user-metadata) method.

This method takes the following parameters:

```ts
chat.getUser(
    id: string
): Promise<User | null>
```

#### Input

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes |  | [Unique user identifier](https://www.pubnub.com/docs/general/setup/users-and-devices#user-id-usage) (up to 92 UTF-8 characters). |

#### Output

| Type | Description |
| --- | --- |
| `Promise<User>` or `Promise<null>` | Returned object containing the user metadata or a null value if the user doesn't exist. |

#### Errors

If you try to fetch a user without providing their ID, you will receive the `ID is required` error.

### Sample code

Get details on user `support_agent_15`.

```ts
// reference the "chat" object and invoke the "getUser()" method
const user = await chat.getUser("support_agent_15")
```

## Get current user

`currentUser` returns the current chat user.

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) in the [Admin Portal](https://admin.pubnub.com/) to store user data.
:::

### Method signature

This method has the following signature:

```ts
chat.currentUser: User
```

#### Properties

| Property | Description |
| --- | --- |
| `currentUser`Type: `User` | Returned [User object](https://www.pubnub.com/docs/chat/chat-sdk/learn/chat-entities/user). |

### Sample code

Return the current chat user.

```ts
chat.currentUser
```