---
source_url: https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/read-receipts
title: Read receipts
updated_at: 2026-06-11T11:34:26.890Z
---

> 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


# Read receipts

:::note Required setup
Read Receipts requires [Unread Message Count](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/unread). First, [set the last read timetoken](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/unread#mark-messages-as-read-one-channel) for each user on a channel.
:::

Read receipts show if channel members have viewed a message.

The SDK provides two complementary methods for working with read receipts:

* [FetchReadReceipts()](#fetch-read-receipts) — one-time paginated fetch. Returns the last-read timetoken for each member. Use this for initial load or on-demand checks. Supports any number of channel members.
* [StreamReadReceipts()](#get-read-receipts) — real-time subscription. Delivers updates via the channel's `OnReadReceiptReceived` delegate as individual users update their read position. Each update contains a single user's last-read timetoken, not a full member list.

##### Usage in Blueprints and C++

You can use PubNub's functionality via Blueprints or directly in C++ code.

* In Blueprints, you can access PubNub from any Widget or Actor. Start by [initializing chat](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#initialize-pubnub-chat) using `InitChat` on `UPubnubChatSubsystem`. Afterwards, you can use the returned `UPubnubChat` object reference to call all Chat SDK functions.

:::warning Blueprint functions
The Blueprints provided in the documentation show how you can structure your application and may contain utility methods and elements like buttons that are not part of the Unreal Chat SDK and are meant to serve as guidance.
:::

* In C++, you can use UPubnubChatSubsystem as any other Game Instance Subsystem. #include "Kismet/GameplayStatics.h" #include "Engine/GameInstance.h" #include "PubnubChatSubsystem.h" // ACTION REQUIRED: Replace ASample_ChatSubsystem with name of your Actor class void ASample_ChatSubsystem::InitChatSample() { // Get PubnubChatSubsystem from GameInstance UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(this); UPubnubChatSubsystem* PubnubChatSubsystem = GameInstance->GetSubsystem<UPubnubChatSubsystem>(); // Initialize Chat - InitChat may fail under some conditions so make sure to check the Result for errors before using the Chat FPubnubChatInitChatResult InitChatResult = PubnubChatSubsystem->InitChat(TEXT("demo"), TEXT("demo"), TEXT("Player_001")); UPubnubChat* PubnubChat = InitChatResult.Chat; } Chat now allows you to call all Chat SDK functions, for example, Chat->GetChannel("my_channel").

:::note Asynchronous and synchronous method execution
Most PubNub Unreal SDK methods are available in both asynchronous and synchronous variants.
* Asynchronous methods (Async suffix) return void and take an optional delegate parameter that fires when the operation completes. 1Channel->StreamReadReceiptsAsync(OnStreamReadReceiptsResponseDelegate); You can also use native callbacks that accept lambdas instead of dynamic delegates. Native callback types have the Native suffix (for example, FOnPubnubChatOperationResponseNative).
* Synchronous methods (no suffix) block the main game thread until the operation completes and return a result struct directly. 1FPubnubChatOperationResult Result = Channel->StreamReadReceipts();
:::

## Get read receipts

`StreamReadReceipts()` provides read status for messages on a channel. The method fetches member read status and listens for updates. Read receipt data is delivered via the channel's `OnReadReceiptReceived` multicast delegate—bind it before calling `StreamReadReceipts()`.

:::warning Not available for public chats
Read receipts are disabled in [public chats](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create#create-public-channel).
:::

### Method signature

```cpp
Channel->StreamReadReceipts();
```

#### Output

| Type | Description |
| --- | --- |
| `FPubnubChatOperationResult` | Contains `Error` and `ErrorMessage`; use to check if the operation succeeded. |

To stop receiving read receipt updates, call `StopStreamingReadReceipts()` on the channel.

## Fetch read receipts

Retrieve a snapshot of the current read status for all channel members with `FetchReadReceipts()`. Unlike `StreamReadReceipts()`, this is a one-time fetch that does not subscribe to updates.

### Method signature

#### C++ / Input parameters

```cpp
Channel->FetchReadReceipts(
    int Limit = 0,
    FString Filter = "",
    FPubnubMemberSort Sort = FPubnubMemberSort(),
    FPubnubPage Page = FPubnubPage()
);
```

| Parameter | Description |
| --- | --- |
| `Limit`Type: `int`Default: `0` | Number of member read receipts to return. Pass `0` to use the server default. |
| `Filter`Type: `FString`Default: `""` | Expression used to filter the results. The filter language is [defined here](https://www.pubnub.com/docs/general/metadata/filtering). |
| `Sort`Type: `FPubnubMemberSort`Default: n/a | Struct defining the property to sort by and sort direction. |
| `Page`Type: `FPubnubPage`Default: n/a | Object used for pagination to define which previous or next result page you want to fetch. |
| `> Next`Type: `FString`Default: n/a | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination. |
| `> Prev`Type: `FString`Default: n/a | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination. Ignored if `Next` is supplied. |

#### Output

| Parameter | Description |
| --- | --- |
| `FPubnubChatFetchReadReceiptsResult`Type: `struct` | Returned object containing `Result`, `ReadReceipts`, `Page`, and `Total`. |
| `> Result`Type: `FPubnubChatOperationResult` | Contains `Error` and `ErrorMessage` for operation status. |
| `> ReadReceipts`Type: `TArray<FPubnubChatReadReceipt>` | Array of read receipts for channel members. |
| `>> UserID`Type: `FString` | Unique identifier of the user who generated this read receipt. |
| `>> LastReadTimetoken`Type: `FString` | Timetoken of the last message read by this user. Messages before this timetoken are considered read. |
| `> Page`Type: `FPubnubPage` | Object used for pagination. |
| `>> Next`Type: `FString` | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
| `>> Prev`Type: `FString` | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page. Ignored if `Next` is supplied. |
| `> Total`Type: `int` | Total number of member read receipts. |

### Sample code

Fetch the current read receipt status for all members of the `support` channel.

```cpp
FPubnubChatFetchReadReceiptsResult Result = Channel->FetchReadReceipts();
if (!Result.Result.Error)
{
    for (const FPubnubChatReadReceipt& Receipt : Result.ReadReceipts)
    {
        UE_LOG(LogTemp, Log, TEXT("User %s last read: %s"), *Receipt.UserID, *Receipt.LastReadTimetoken);
    }
}
```

### Sample code

:::tip Reference code
This example is a self-contained code snippet ready to be run. Set up your Unreal project and follow the instructions in the lines marked with `ACTION REQUIRED` before running the code. Use it as a reference when working with other examples in this document.
:::

Stream read receipt events on a channel.

###### Actor.h

```cpp
UFUNCTION(BlueprintCallable, Category = "PubnubChat|Samples|ChatChannel")
void StreamReadReceiptsSample();

void OnReadReceiptReceived(const FPubnubChatReadReceipt& ReadReceipts);
```

###### Actor.cpp

```cpp
// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::StreamReadReceiptsSample()
{
	// snippet.hide
	UPubnubChatChannel* Channel = nullptr;
	// snippet.show

	// Assumes Channel is a valid UPubnubChatChannel (e.g. from GetChannel)

	// Bind to receive read receipt events (who read which message)
	Channel->OnReadReceiptReceivedNative.AddUObject(this, &ASample_ChatChannel::OnReadReceiptReceived);

	// Start streaming read receipts (not supported on public channels; use for group or direct)
	Channel->StreamReadReceiptsAsync(nullptr);

	// When read receipts are no longer needed, stop streaming
	Channel->StopStreamingReadReceiptsAsync(nullptr);
}

// ACTION REQUIRED: Replace ASample_ChatChannel with name of your Actor class
void ASample_ChatChannel::OnReadReceiptReceived(const FPubnubChatReadReceipt& ReadReceipts)
{
	/* e.g. update read state per message in chat UI */
}
```