On this page

User object

User represents a single user in a chat.

Properties

The User object has the following properties:

ParameterDescription
Id
Type: FString
Unique identifier for the user. Access using GetUserID().
UserData
Type: FPubnubChatUserData
Additional data. Access using GetUserData().
 → UserName
Type: FString
Display name for the user (must not be empty or consist only of whitespace characters).
 → ExternalID
Type: FString
User's identifier in an external system. You can use it to match id with a similar identifier from an external database.
 → ProfileUrl
Type: FString
URL of the user's profile picture.
 → Email
Type: FString
User's email address.
 → Custom
Type: FString
JSON providing custom data about the user. Values must be scalar only; arrays or objects are not supported. Filtering App Context data through the custom property is not recommended in SDKs.
 → Status
Type: FString
Tag that lets you categorize your app users by their current state. The tag choice is entirely up to you and depends on your use case. For example, you can use status to mark users in your chat app as invited, active, or archived. Maximum length is 50 characters.
 → Type
Type: FString
Tag that lets you categorize your app users by their functional roles. The tag choice is entirely up to you and depends on your use case. For example, you can use type to group users by their roles in your app, such as moderator, player, or support-agent. Maximum length is 50 characters.
API limits

To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.

Methods

You can call the following methods on the User object.

Click on each method for more details.

Streaming

Call these methods to subscribe to or unsubscribe from real-time events on this User object.

Use case

User methods enable:

Last updated on