---
url: https://talkjs.com/docs/UI_Components/React_Native/Object_Types/UserData
---

# UserSnapshot

Represent a snapshot of a user's public profile data.

Ask a question Copy for LLM [View as Markdown](/docs/UI_Components/React_Native/Object_Types/UserData.md)
A snapshot of a user's attributes at a given moment in time.

Users also have private information, such as email addresses and phone numbers, but these are only exposed on the [REST API](/docs/REST_API/).

## Example

```typescript
{
    "id": "650d5ed0cae49",
    "name": "Alice",
    "welcomeMessage": null,
    "photoUrl": null,
    "role": "default",
    "custom": {},
    "availabilityText": null,
    "locale": null,
  }
```

## Properties

| Name | Type | Description |
| --- | --- | --- |
| **id** | `string` | The unique ID which is used to identify the user in TalkJS |
| **name** | `string` | The user's name which will be displayed on the TalkJS UI |
| **photoUrl** | `string` \| `null` | An optional URL to a photo which will be displayed as the user's avatar |
| **welcomeMessage** | `string` \| `null` | The default message a user sees when starting a chat with that person |
| **role** | `string` | TalkJS supports multiple sets of settings, called "roles". [Roles](/docs/Concepts/Roles/) allow you to change the behavior of TalkJS for different users. You have full control over which user gets which configuration. |
| **custom** | [`CustomData`](/docs/UI_Components/React_Native/Object_Types/CustomData/) | Custom metadata you have set on the user |
| **locale** | `string` \| `null` | The locale field expects an [IETF language tag](https://www.w3.org/International/articles/language-tags/). See the [localization documentation](/docs/Features/Language_Support/#localization).
When `locale` is null, the app's default locale will be used |

## Used by

- [`SendMessageEvent`](/docs/UI_Components/React_Native/Components/Chatbox/#sendmessageevent)
- [`SelectConversationEvent`](/docs/UI_Components/React_Native/Components/ConversationList/#selectconversationevent)