App Context API for Unreal SDK

App Context provides easy-to-use, serverless storage for user and channel data you need to build innovative, reliable, scalable applications. Use App Context to easily store metadata about your application users and channels, and their membership associations, without the need to stand up your own databases.

PubNub also triggers events when object data is changed: set, updated, or removed from the database. At the same time, making a request to set the same data that already exist, doesn't trigger any event. Clients can receive these events in real time and update their front-end application accordingly.

icon

Usage in Blueprints and C++


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.

    1PubnubClient->GetAllUserMetadataAsync(OnGetAllUserMetadataResponse, Include, Limit, Filter, Sort, Page);

    You can also use native callbacks that accept lambdas instead of dynamic delegates. Native callback types have the Native suffix (for example, FOnPubnubGetAllUserMetadataResponseNative).

  • Synchronous methods (no suffix) block the main game thread until the operation completes and return a result struct directly.

    1FPubnubGetAllUserMetadataResult Result = PubnubClient->GetAllUserMetadata(Include, Limit, Filter, Sort, Page);

User​

Get metadata for all users​

Retrieve user metadata in pages. The list includes the Custom object if requested.

Required keyset configuration
To get all channel and user metadata, you must uncheck the Disallow Get All Channel Metadata and Disallow Get All User Metadata checkboxes in the App Context section of your keyset configuration in the Admin Portal.

Method(s)​

Method variants

You can also call the GetAllUserMetadataRaw variant of this method which takes String values for Include and Sort instead of the FPubnubGetAllInclude and FPubnubGetAllSort structs.

1// Synchronous
2FPubnubGetAllUserMetadataResult Result = PubnubClient->GetAllUserMetadata(
3 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
4 int Limit = 100,
5 FString Filter = "",
6 FPubnubGetAllSort Sort = FPubnubGetAllSort(),
7 FPubnubPage Page = FPubnubPage()
8);
9
10// Asynchronous
11PubnubClient->GetAllUserMetadataAsync(
12 FOnPubnubGetAllUserMetadataResponse OnGetAllUserMetadataResponse,
13 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
14 int Limit = 100,
15 FString Filter = "",
show all 18 lines
OnGetAllUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetAllUserMetadataResponseNative to handle the result using a lambda.
Include#
A list of property names to include in the response.
Limit#
Type: int
Number of objects to return. Default/Max: 100.
Filter#
Type: FString
Filter expression. Only matching objects are returned. See filtering.
Sort#
Type: FPubnubGetAllSort
Sort criteria. Each entry sets a property (EPubnubGetAllSortType) and a sort direction.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.

FPubnubGetAllInclude​

FieldTypeDescription
IncludeCustomboolWhether to include the Custom object in the response.
IncludeStatusboolWhether to include the Status field of the object.
IncludeTypeboolWhether to include the Type field of the object.
IncludeTotalCountboolWhether to include the total count.

FPubnubGetAllSort​

FieldTypeDescription
GetAllSortTArray<FPubnubGetAllSingleSort>Array of sorts for the get all functions. The order matters, sorts are applied from the first index to the last.

FPubnubGetAllSingleSort​

Field NameTypeDefaultDescription
SortTypeEPubnubGetAllSortTypeEPubnubGetAllSortType::PGAST_IDProperty to sort by.
SortOrderboolfalseAscending when false, descending when true.

EPubnubGetAllSortType​

Enum ValueDisplay NameDescription
PGAST_IDUserIDSort by ID
PGAST_NameUserNameSort by name
PGAST_UpdatedUserUpdatedSort by last update
PGAST_StatusUserStatusSort by status
PGAST_TypeUserTypeSort by type

Sample code​

Actor.h​


1

Actor.cpp​


1

Other examples​
Get metadata for all users with additional settings​
Actor.h​
1

Actor.cpp​
1

Get metadata for all users with all includes​
Actor.h​
1

Actor.cpp​
1

Get metadata for all users with lambda​
Actor.h​
1

Actor.cpp​
1

Get metadata for all users raw​
Actor.h​
1

Actor.cpp​
1

Returns​

FPubnubGetAllUserMetadataResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
UsersDataTArray<FPubnubUserData>Array of FPubnubUserData structs which are the users with their associated User metadata.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of users matching the request (when requested).
FOnPubnubGetAllUserMetadataResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
UsersDataconst TArray<FPubnubUserData>&Array of FPubnubUserData structs which are the users with their associated User metadata.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of users matching the request (when requested).
FPubnubPage​

FieldTypeDescription
NextFStringCursor for forward pagination. Use in the next request to fetch the following page.
PrevFStringCursor for backward pagination. Use in the next request to fetch the previous page. Ignored if Next is supplied.
FPubnubUserData​

FieldTypeDescription
UserIDFStringUnique user identifier. Ignored during set operations.
UserNameFStringDisplay name for the user.
ExternalIDFStringUser's identifier in an external system.
ProfileUrlFStringThe URL of the user's profile picture.
EmailFStringThe user's email address.
CustomFStringCustom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported.
StatusFStringUser status. Max. 50 characters.
TypeFStringUser type. Max. 50 characters.
UpdatedFStringThe date when the user's metadata was last updated.
ETagFStringInformation on the object's content fingerprint.
FOnPubnubGetAllUserMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
UsersDataconst TArray<FPubnubUserData>&Array of FPubnubUserData structs which are the users with their associated User metadata.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of users matching the request (when requested).

Get user metadata - UserMetadata entity​

icon

Available in entities

UserMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Retrieve metadata for a user. You can include the Custom object.

Method(s)​

1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubClient->CreateUserMetadataEntity(FString User);
2
3// Synchronous
4FPubnubUserMetadataResult Result = UserMetadataEntity->GetUserMetadata(
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
7
8// Asynchronous
9UserMetadataEntity->GetUserMetadataAsync(
10 FOnPubnubGetUserMetadataResponse OnGetUserMetadataResponse,
11 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
12);
OnGetUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetUserMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Get user metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Get user metadata - PubNub client​

Retrieve metadata for a user. You can include the Custom object.

Method(s)​

1// Synchronous
2FPubnubUserMetadataResult Result = PubnubClient->GetUserMetadata(
3 FString User,
4 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
5);
6
7// Asynchronous
8PubnubClient->GetUserMetadataAsync(
9 FString User,
10 FOnPubnubGetUserMetadataResponse OnGetUserMetadataResponse,
11 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
12);
required
User required#
Type: FString
The metadata ID for which to retrieve the user object. Can't be empty.
OnGetUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetUserMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FPubnubUserMetadataResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
UserDataFPubnubUserDataThe user with their associated User metadata.
FOnPubnubGetUserMetadataResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
UserDataFPubnubUserDataThe user with their associated User metadata.
FOnPubnubGetUserMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
UserDataconst FPubnubUserData&The user with their associated User metadata.

Other examples​

Get metadata for a user with all includes​
Actor.h​
1

Actor.cpp​
1

Get metadata for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Get metadata for a user raw​
Actor.h​
1

Actor.cpp​
1

Set user metadata with additional settings​
Actor.h​
1

Actor.cpp​
1

Set user metadata with result struct​
Actor.h​
1

Actor.cpp​
1

Remove user metadata with result struct​
Actor.h​
1

Actor.cpp​
1

Set user metadata - UserMetadata entity​

icon

Available in entities

UserMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Unsupported partial updates of custom metadata

The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:

  1. Get the existing metadata and store it locally.
  2. Append the new custom metadata to the existing one.
  3. Set the entire updated custom object.

Set metadata for a User in the database, optionally including the custom data object for each.

Method(s)​

1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubClient->CreateUserMetadataEntity(FString User);
2
3// Synchronous
4FPubnubUserMetadataResult Result = UserMetadataEntity->SetUserMetadata(
5 FPubnubUserInputData UserMetadata,
6 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
7);
8
9// Asynchronous
10UserMetadataEntity->SetUserMetadataAsync(
11 FPubnubUserInputData UserMetadata,
12 FOnPubnubSetUserMetadataResponse OnSetUserMetadataResponse,
13 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
14);
required
UserMetadata required#
The user metadata to set (input struct that supports ForceSet fields for partial updates).
OnSetUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetUserMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
API limits

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

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Set user metadata with result​
Actor.h​
1

Actor.cpp​
1

Set user metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Set user metadata - PubNub client​

Unsupported partial updates of custom metadata

The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:

  1. Get the existing metadata and store it locally.
  2. Append the new custom metadata to the existing one.
  3. Set the entire updated custom object.

Set metadata for a User in the database, optionally including the custom data object for each. Use FPubnubUserInputData for the metadata payload (supports ForceSet fields for partial updates).

Method(s)​

1// Synchronous
2FPubnubUserMetadataResult Result = PubnubClient->SetUserMetadata(
3 FString User,
4 FPubnubUserInputData UserMetadata,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
7
8// Asynchronous
9PubnubClient->SetUserMetadataAsync(
10 FString User,
11 FPubnubUserInputData UserMetadata,
12 FOnPubnubSetUserMetadataResponse OnSetUserMetadataResponse,
13 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
14);
required
User required#
Type: FString
The metadata ID for which to set the user object. Can't be empty.
UserMetadata required#
The user metadata to set (input struct; supports ForceSet for partial updates).
OnSetUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetUserMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
API limits

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

FPubnubUserInputData​

Used for set operations. Contains the same fields as FPubnubUserData (e.g. UserName, Email, Custom, etc.). When present, ForceSet-style fields control which properties are updated (partial updates).

FPubnubGetMetadataInclude​

FieldTypeDescription
IncludeCustomboolWhether to include the object's Custom field.
IncludeStatusboolWhether to include the object's Status field.
IncludeTypeboolWhether to include the object's Type field.

Returns​

FOnPubnubSetUserMetadataResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
UserDataFPubnubUserDataThe user metadata object that was set.

FOnPubnubSetUserMetadataResponseNative​

FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
UserDataconst FPubnubUserData&The user metadata object that was set.

Sample code​

Actor.h​


1

Actor.cpp​


1

Other examples​

Set metadata for a user with result​
Actor.h​
1

Actor.cpp​
1

Set metadata for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Set metadata for a user raw​
Actor.h​
1

Actor.cpp​
1

Iteratively update existing metadata​
Actor.h​
1

Actor.cpp​
1

Remove user metadata - UserMetadata entity​

icon

Available in entities

UserMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Removes the metadata from a specified user UUID.

Method(s)​

1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubClient->CreateUserMetadataEntity(FString User);
2
3// Synchronous
4FPubnubOperationResult Result = UserMetadataEntity->RemoveUserMetadata();
5
6// Asynchronous
7UserMetadataEntity->RemoveUserMetadataAsync(FOnPubnubRemoveUserMetadataResponse OnRemoveUserMetadataResponse);
OnRemoveUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveUserMetadataResponseNative to handle the result using a lambda.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Remove user metadata with result​
Actor.h​
1

Actor.cpp​
1

Remove user metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Remove user metadata - PubNub client​

Removes the metadata from a specified user UUID.

Method(s)​

1// Synchronous
2FPubnubOperationResult Result = PubnubClient->RemoveUserMetadata(FString User);
3
4// Asynchronous
5PubnubClient->RemoveUserMetadataAsync(FString User, FOnPubnubRemoveUserMetadataResponse OnRemoveUserMetadataResponse);
required
User required#
Type: FString
The metadata ID to delete from the user object. Can't be empty.
OnRemoveUserMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveUserMetadataResponseNative to handle the result using a lambda.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FOnPubnubRemoveUserMetadataResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
FOnPubnubRemoveUserMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.

Other examples​

Remove metadata for a user with result​
Actor.h​
1

Actor.cpp​
1

Remove metadata for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Channel​

Get metadata for all channels​

Retrieve channel metadata in pages. The list includes the Custom object if requested.

Method(s)​

Method variants

You can also call the GetAllChannelMetadataRaw variant of this method which takes String values for Include and Sort instead of the FPubnubGetAllInclude and FPubnubGetAllSort structs.

1// Synchronous
2FPubnubGetAllChannelMetadataResult Result = PubnubClient->GetAllChannelMetadata(
3 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
4 int Limit = 100,
5 FString Filter = "",
6 FPubnubGetAllSort Sort = FPubnubGetAllSort(),
7 FPubnubPage Page = FPubnubPage()
8);
9
10// Asynchronous
11PubnubClient->GetAllChannelMetadataAsync(
12 FOnPubnubGetAllChannelMetadataResponse OnGetAllChannelMetadataResponse,
13 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
14 int Limit = 100,
15 FString Filter = "",
show all 18 lines
OnGetAllChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetAllChannelMetadataResponseNative to handle the result using a lambda.
Include#
A list of property names to include in the response.
Limit#
Type: int
Number of objects to return. Default/Max: 100.
Filter#
Type: FString
Filter expression. Only matching objects are returned. See filtering.
Sort#
Type: FPubnubGetAllSort
Sort criteria. Each entry sets a property (EPubnubGetAllSortType) and a sort direction.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FPubnubGetAllChannelMetadataResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
ChannelsDataTArray<FPubnubChannelData>Array of FPubnubChannelData structs which are the channels with their associated metadata.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of channels matching the request (when requested).
FOnPubnubGetAllChannelMetadataResponse​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
ChannelsDataconst TArray<FPubnubChannelData>&Array of FPubnubChannelData structs which are the channels with their associated metadata.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of channels matching the request (when requested).
FPubnubChannelData​
FieldTypeDescription
ChannelIDFStringID of the channel.
ChannelNameFStringName of the channel.
DescriptionFStringAdditional description of the channel.
CustomFStringCustom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported.
StatusFStringChannel status. Max 50 characters.
TypeFStringChannel type. Max 50 characters.
UpdatedFStringThe date when the channel's metadata was last updated.
ETagFStringVersion identifier of the channel's metadata.
FOnPubnubGetAllChannelMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
ChannelsDataconst TArray<FPubnubChannelData>&Array of FPubnubChannelData structs which are the channels with their associated metadata.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of channels matching the request (when requested).

Other examples​

Get metadata for all channels with settings​
Actor.h​
1

Actor.cpp​
1

Get metadata for all channels with all includes​
Actor.h​
1

Actor.cpp​
1

Get metadata for all channels with lambda​
Actor.h​
1

Actor.cpp​
1

Get metadata for all channels raw​
Actor.h​
1

Actor.cpp​
1

Get channel metadata - ChannelMetadata entity​

icon

Available in entities

ChannelMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Retrieve metadata for a channel. You can include the Custom object.

Method(s)​

1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubClient->CreateChannelMetadataEntity(FString Channel);
2
3// Synchronous
4FPubnubChannelMetadataResult Result = ChannelMetadataEntity->GetChannelMetadata(
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
7
8// Asynchronous
9ChannelMetadataEntity->GetChannelMetadataAsync(
10 FOnPubnubGetChannelMetadataResponse OnGetChannelMetadataResponse,
11 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
12);
required
OnGetChannelMetadataResponse required#
The delegate for the operation's result.

You can also use a native callback of the type FOnGetChannelMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Get channel metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Get channel metadata - PubNub client​

Retrieve metadata for a channel. You can include the Custom object.

Method(s)​

1// Synchronous
2FPubnubChannelMetadataResult Result = PubnubClient->GetChannelMetadata(
3 FString Channel,
4 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
5);
6
7// Asynchronous
8PubnubClient->GetChannelMetadataAsync(
9 FString Channel,
10 FOnPubnubGetChannelMetadataResponse OnGetChannelMetadataResponse,
11 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
12);
required
Channel required#
Type: FString
The channel ID for which to retrieve the channel object. Can't be empty.
OnGetChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetChannelMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FPubnubChannelMetadataResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
ChannelDataFPubnubChannelDataThe channel with its associated metadata.
FOnPubnubGetChannelMetadataResponse​
FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
ChannelDataFPubnubChannelDataThe channel with its associated metadata.
FOnPubnubGetChannelMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
ChannelDataconst FPubnubChannelData&The channel with its associated metadata.

Other examples​

Get metadata for a channel with all includes​
Actor.h​
1

Actor.cpp​
1

Get metadata for a channel with lambda​
Actor.h​
1

Actor.cpp​
1

Get metadata for a channel raw​
Actor.h​
1

Actor.cpp​
1

Set channel metadata with additional settings​
Actor.h​
1

Actor.cpp​
1

Set channel metadata with result struct​
Actor.h​
1

Actor.cpp​
1

Remove channel metadata with result struct​
Actor.h​
1

Actor.cpp​
1

Set channel metadata - ChannelMetadata entity​

icon

Available in entities

ChannelMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Unsupported partial updates of custom metadata

The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:

  1. Get the existing metadata and store it locally.
  2. Append the new custom metadata to the existing one.
  3. Set the entire updated custom object.

Set metadata for a channel in the database, optionally including the custom data object for each.

Method(s)​

1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubClient->CreateChannelMetadataEntity(FString Channel);
2
3// Synchronous
4FPubnubChannelMetadataResult Result = ChannelMetadataEntity->SetChannelMetadata(
5 FPubnubChannelInputData ChannelMetadata,
6 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
7);
8
9// Asynchronous
10ChannelMetadataEntity->SetChannelMetadataAsync(
11 FPubnubChannelInputData ChannelMetadata,
12 FOnPubnubSetChannelMetadataResponse OnSetChannelMetadataResponse,
13 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
14);
required
ChannelMetadata required#
The channel metadata to set (input struct that supports ForceSet fields for partial updates).
OnSetChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetChannelMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
API limits

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

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Set channel metadata with result​
Actor.h​
1

Actor.cpp​
1

Set channel metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Set channel metadata - PubNub client​

Unsupported partial updates of custom metadata

The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:

  1. Get the existing metadata and store it locally.
  2. Append the new custom metadata to the existing one.
  3. Set the entire updated custom object.

Set metadata for a channel in the database, optionally including the custom data object for each. Use FPubnubChannelInputData for the metadata payload (supports ForceSet fields for partial updates).

Method(s)​

1// Synchronous
2FPubnubChannelMetadataResult Result = PubnubClient->SetChannelMetadata(
3 FString Channel,
4 FPubnubChannelInputData ChannelMetadata,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
7
8// Asynchronous
9PubnubClient->SetChannelMetadataAsync(
10 FString Channel,
11 FPubnubChannelInputData ChannelMetadata,
12 FOnPubnubSetChannelMetadataResponse OnSetChannelMetadataResponse,
13 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
14);
required
Channel required#
Type: FString
The metadata ID for which to set the channel object. Can't be empty.
ChannelMetadata required#
The channel metadata to set (input struct; supports ForceSet for partial updates).
OnSetChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetChannelMetadataResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
API limits

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

FPubnubChannelInputData​

Used for set operations. Contains the same fields as FPubnubChannelData (e.g. ChannelName, Description, Custom, etc.). When present, ForceSet-style fields control which properties are updated (partial updates).

Returns​

FOnPubnubSetChannelMetadataResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
ChannelDataFPubnubChannelDataThe channel metadata object that was set.

FOnPubnubSetChannelMetadataResponseNative​

FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
ChannelDataconst FPubnubChannelData&The channel metadata object that was set.

Sample code​

Actor.h​


1

Actor.cpp​


1

Other examples​

Set metadata for a channel with result​
Actor.h​
1

Actor.cpp​
1

Set metadata for a channel with lambda​
Actor.h​
1

Actor.cpp​
1

Set metadata for a channel raw​
Actor.h​
1

Actor.cpp​
1

Iteratively update existing metadata​
Actor.h​
1

Actor.cpp​
1

Remove channel metadata - ChannelMetadata entity​

icon

Available in entities

ChannelMetadata

Requires App Context add-on

This method requires the App Context add-on enabled for your key in the Admin Portal.

Removes the metadata from a specified channel.

Method(s)​

1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubClient->CreateChannelMetadataEntity(FString Channel);
2
3// Synchronous
4FPubnubOperationResult Result = ChannelMetadataEntity->RemoveChannelMetadata();
5
6// Asynchronous
7ChannelMetadataEntity->RemoveChannelMetadataAsync(FOnPubnubRemoveChannelMetadataResponse OnRemoveChannelMetadataResponse);
OnRemoveChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveChannelMetadataResponseNative to handle the result using a lambda.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

Other examples​

Remove channel metadata with result​
Actor.h​
1

Actor.cpp​
1

Remove channel metadata with lambda​
Actor.h​
1

Actor.cpp​
1

Remove channel metadata - PubNub client​

Removes the metadata from a specified channel.

Method(s)​

1// Synchronous
2FPubnubOperationResult Result = PubnubClient->RemoveChannelMetadata(FString Channel);
3
4// Asynchronous
5PubnubClient->RemoveChannelMetadataAsync(FString Channel, FOnPubnubRemoveChannelMetadataResponse OnRemoveChannelMetadataResponse);
required
Channel required#
Type: FString
The metadata ID to delete from the channel object. Can't be empty.
OnRemoveChannelMetadataResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveChannelMetadataResponseNative to handle the result using a lambda.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FOnPubnubRemoveChannelMetadataResponse​
FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
FOnPubnubRemoveChannelMetadataResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.

Other examples​

Remove metadata for a channel with result​
Actor.h​
1

Actor.cpp​
1

Remove metadata for a channel with lambda​
Actor.h​
1

Actor.cpp​
1

Channel memberships​

Get channel memberships​

The method returns a list of channel memberships for a user. This method doesn't return a user's subscriptions.

Method(s)​

Method variants

You can also call the GetMembershipsRaw variant of this method which takes String values for Include and Sort instead of the FPubnubMembershipInclude and FPubnubMembershipSort structs.

1// Synchronous
2FPubnubMembershipsResult Result = PubnubClient->GetMemberships(
3 FString User,
4 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
5 int Limit = 100,
6 FString Filter = "",
7 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
8 FPubnubPage Page = FPubnubPage()
9);
10
11// Asynchronous
12PubnubClient->GetMembershipsAsync(
13 FString User,
14 FOnPubnubGetMembershipsResponse OnGetMembershipsResponse,
15 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
show all 20 lines
required
User required#
Type: FString
The user UUID for whom to retrieve memberships.
OnGetMembershipsResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetMembershipsResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
Number of objects to return. Default/Max: 100.
Filter#
Type: FString
Filter expression. Only matching objects are returned. See filtering.
Sort#
Key-value pair of a property to sort by, and a sort direction.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.

FPubnubMembershipInclude​

Field NameTypeDefault ValueDescription
IncludeCustomboolfalseWhether to include the membership's Custom field.
IncludeStatusboolfalseWhether to include the membership's Status field.
IncludeTypeboolfalseWhether to include the membership's Type field.
IncludeChannelboolfalseWhether to include the membership's Channel data field (in form of FPubnubChannelData).
IncludeChannelCustomboolfalseWhether to include the membership's Channel Custom field.
IncludeChannelStatusboolfalseWhether to include the membership's Channel Status field
IncludeChannelTypeboolfalseWhether to include the membership's Channel Type field
IncludeTotalCountboolfalseWhether to include the total count of memberships

FPubnubMembershipSort​

Field NameTypeDescription
MembershipSortTArray<FPubnubMembershipSingleSort>Array of sort criteria used in Membership-related functions. Order matters (applied in sequence).

FPubnubMembershipSingleSort​

Field NameTypeDefaultDescription
SortTypeEPubnubMembershipSortTypeEPubnubMembershipSortType::PMST_ChannelIDField to sort by in the Membership context
SortOrderboolfalseAscending when false, descending when true

EPubnubMembershipSortType​

Enum ValueDisplay NameDescription
PMST_ChannelIDChannelIDSort by Channel ID
PMST_ChannelNameChannelNameSort by Channel Name
PMST_ChannelUpdatedChannelUpdatedSort by last update to the Channel
PMST_ChannelStatusChannelStatusSort by Channel Status
PMST_ChannelTypeChannelTypeSort by Channel Type
PMST_UpdatedUpdatedSort by Membership update timestamp
PMST_StatusStatusSort by Membership status
PMST_TypeTypeSort by Membership type

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FPubnubMembershipsResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembershipsDataTArray<FPubnubMembershipData>Array of FPubnubMembershipData structs which are the memberships.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).
FOnPubnubGetMembershipsResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).
FPubnubMembershipData​

FieldTypeDescription
ChannelFPubnubChannelDataContains channel metadata, including unique channel identifier and other relevant information.
CustomFStringCustom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported.
StatusFStringStatus of the membership. Max 50 characters.
TypeFStringType of the membership. Max 50 characters.
UpdatedFStringThe date when the channel's membership was last updated.
ETagFStringVersion identifier of the membership metadata.
FOnPubnubGetMembershipsResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).

Other examples​

Get memberships for a user with settings​
Actor.h​
1

Actor.cpp​
1

Get memberships for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Get memberships for a user with raw​
Actor.h​
1

Actor.cpp​
1

Set channel memberships​

Set channel memberships for a User.

Method(s)​

1// Synchronous
2FPubnubMembershipsResult Result = PubnubClient->SetMemberships(
3 FString User,
4 TArray<FPubnubMembershipInputData> Channels,
5 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
9 FPubnubPage Page = FPubnubPage()
10);
11
12// Asynchronous
13PubnubClient->SetMembershipsAsync(
14 FString User,
15 TArray<FPubnubMembershipInputData> Channels,
show all 22 lines
required
User required#
Type: FString
The user UUID to add/update the memberships. Can't be empty.
Channels required#
The array of channel memberships to add/update. Can't be empty.
OnSetMembershipsResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetMembershipsResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
The maximum number of memberships to return.
Filter#
Type: FString
The filter to apply to the memberships.
Sort#
The sort order to apply to the memberships.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.
API limits

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

FPubnubMembershipInputData​

FieldTypeDescription
ChannelFStringThe channel ID to add/update the membership. Can't be empty.
CustomFStringThe custom data to add/update the membership.
StatusFStringThe status of the membership.
TypeFStringThe type of the membership.

Returns​

FOnPubnubSetMembershipsResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).

FOnPubnubSetMembershipsResponseNative​

FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).

Sample code​

Actor.h​


1

Actor.cpp​


1

API limits

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

Other examples​

Set memberships for a user with result​
Actor.h​
1

Actor.cpp​
1

Set memberships for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Set memberships for a user with raw​
Actor.h​
1

Actor.cpp​
1

Remove Channel Memberships​

Remove channel memberships for a user.

Method(s)​

1// Synchronous
2FPubnubMembershipsResult Result = PubnubClient->RemoveMemberships(
3 FString User,
4 TArray<FString> Channels,
5 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
9 FPubnubPage Page = FPubnubPage()
10);
11
12// Asynchronous
13PubnubClient->RemoveMembershipsAsync(
14 FString User,
15 TArray<FString> Channels,
show all 22 lines
required
User required#
Type: FString
The user UUID to remove the memberships. Can't be empty.
Channels required#
Type: TArray<FString>
The array of channel IDs to remove the memberships. Can't be empty.
OnRemoveMembershipsResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveMembershipsResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
The maximum number of memberships to return.
Filter#
Type: FString
The filter to apply to the memberships.
Sort#
The sort order to apply to the memberships.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.
API limits

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

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FOnPubnubRemoveMembershipsResponse​
FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).
FOnPubnubRemoveMembershipsResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembershipsDataconst TArray<FPubnubMembershipData>&Array of FPubnubMembershipData structs which are the memberships.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of memberships matching the request (when requested).

Other examples​

Remove memberships for a user with result​
Actor.h​
1

Actor.cpp​
1

Remove memberships for a user with lambda​
Actor.h​
1

Actor.cpp​
1

Remove memberships for a user with raw​
Actor.h​
1

Actor.cpp​
1

Channel members​

Get channel members​

The method returns a list of members in a channel. The list will include user metadata for members that have additional metadata stored in the database.

Method(s)​

Method variants

You can also call the GetChannelMembersRaw variant of this method which takes String values for Include, and Sort instead of the FPubnubMemberInclude and FPubnubMemberSort structs.

1// Synchronous
2FPubnubChannelMembersResult Result = PubnubClient->GetChannelMembers(
3 FString Channel,
4 FPubnubMemberInclude Include = FPubnubMemberInclude(),
5 int Limit = 100,
6 FString Filter = "",
7 FPubnubMemberSort Sort = FPubnubMemberSort(),
8 FPubnubPage Page = FPubnubPage()
9);
10
11// Asynchronous
12PubnubClient->GetChannelMembersAsync(
13 FString Channel,
14 FOnPubnubGetChannelMembersResponse OnGetChannelMembersResponse,
15 FPubnubMemberInclude Include = FPubnubMemberInclude(),
show all 20 lines
required
Channel required#
Type: FString
The Channel ID for which to retrieve members.
OnGetChannelMembersResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubGetChannelMembersResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
Number of objects to return. Default/Max: 100.
Filter#
Type: FString
Expression used to filter the results. Check online documentation to see exact filter formulas.
Sort#
Type: FPubnubMemberSort
Key-value pair of a property to sort by, and a sort direction.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.

FPubnubMemberInclude​

Field NameTypeDefaultDescription
IncludeCustomboolfalseWhether to include the member's Custom field
IncludeStatusboolfalseWhether to include the member's Status field
IncludeTypeboolfalseWhether to include the member's Type field
IncludeUserboolfalseWhether to include the member's User data (in form of FPubnubUserData)
IncludeUserCustomboolfalseWhether to include the member's User Custom field
IncludeUserStatusboolfalseWhether to include the member's User Status field
IncludeUserTypeboolfalseWhether to include the member's User Type field
IncludeTotalCountboolfalseWhether to include the total count of paginated records

FPubnubMemberSort​

Field NameTypeDescription
MemberSortTArray<FPubnubMemberSingleSort>Array of sort criteria used in Member-related functions. Order matters (applied in sequence).

FPubnubMemberSingleSort​

Field NameTypeDefaultDescription
SortTypeEPubnubMemberSortTypeEPubnubMemberSortType::PMeST_UserIDField to sort by in the Member context
SortOrderboolfalseAscending when false, descending when true

EPubnubMemberSortType​

Enum ValueDisplay NameDescription
PMeST_UserIDUserIDSort by Member's User ID
PMeST_UserNameUserNameSort by Member's User Name
PMeST_UserUpdatedUserUpdatedSort by when the User was updated
PMeST_UserStatusUserStatusSort by User Status
PMeST_UserTypeUserTypeSort by User Type
PMeST_UpdatedUpdatedSort by Member record update timestamp
PMeST_StatusStatusSort by Member Status
PMeST_TypeTypeSort by Member Type

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FPubnubChannelMembersResult​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembersDataTArray<FPubnubChannelMemberData>Array of FPubnubChannelMemberData structs which are the members of the channel.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).
FOnPubnubGetChannelMembersResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).
FPubnubChannelMemberData​

FieldTypeDescription
UserFPubnubUserDataContains user metadata, including unique user identifier and other relevant information.
CustomFStringCustom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn't supported.
StatusFStringStatus of the member. Max 50 characters.
TypeFStringType of the member. Max 50 characters.
UpdatedFStringThe date when the channel's member was last updated.
ETagFStringVersion identifier of the member metadata.
FOnPubnubGetChannelMembersResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).

Other examples​

Get channel members with settings​
Actor.h​
1

Actor.cpp​
1

Get channel members with lambda​
Actor.h​
1

Actor.cpp​
1

Get channel members raw​
Actor.h​
1

Actor.cpp​
1

Set channel members​

This method sets members in a channel.

Method(s)​

1// Synchronous
2FPubnubChannelMembersResult Result = PubnubClient->SetChannelMembers(
3 FString Channel,
4 TArray<FPubnubChannelMemberInputData> Users,
5 FPubnubMemberInclude Include = FPubnubMemberInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMemberSort Sort = FPubnubMemberSort(),
9 FPubnubPage Page = FPubnubPage()
10);
11
12// Asynchronous
13PubnubClient->SetChannelMembersAsync(
14 FString Channel,
15 TArray<FPubnubChannelMemberInputData> Users,
show all 22 lines
required
Channel required#
Type: FString
The channel ID to add/update the members. Can't be empty.
Users required#
The array of channel members to add/update. Can't be empty.
OnSetChannelMembersResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubSetChannelMembersResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
The maximum number of members to return.
Filter#
Type: FString
The filter to apply to the members.
Sort#
Type: FPubnubMemberSort
The sort order to apply to the members.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.
API limits

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

FPubnubChannelMemberInputData​

FieldTypeDescription
UserFStringThe user UUID to add/update the membership. Can't be empty.
CustomFStringThe custom data to add/update the membership.
StatusFStringThe status of the membership.
TypeFStringThe type of the membership.

Returns​

FOnPubnubSetChannelMembersResponse​

FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).

FOnPubnubSetChannelMembersResponseNative​

FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).

Sample code​

Actor.h​


1

Actor.cpp​


1

API limits

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

Other examples​

Set channel members with result​
Actor.h​
1

Actor.cpp​
1

Set channel members with lambda​
Actor.h​
1

Actor.cpp​
1

Set channel members raw​
Actor.h​
1

Actor.cpp​
1

Remove Channel Members​

Remove members from a channel.

Method(s)​

1// Synchronous
2FPubnubChannelMembersResult Result = PubnubClient->RemoveChannelMembers(
3 FString Channel,
4 TArray<FString> Users,
5 FPubnubMemberInclude Include = FPubnubMemberInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMemberSort Sort = FPubnubMemberSort(),
9 FPubnubPage Page = FPubnubPage()
10);
11
12// Asynchronous
13PubnubClient->RemoveChannelMembersAsync(
14 FString Channel,
15 TArray<FString> Users,
show all 22 lines
required
Channel required#
Type: FString
The channel ID to remove the members. Can't be empty.
Users required#
Type: TArray<FString>
The array of user UUIDs to remove from the channel. Can't be empty.
OnRemoveChannelMembersResponse#
The delegate for the operation's result.

You can also use a native callback of the type FOnPubnubRemoveChannelMembersResponseNative to handle the result using a lambda.
Include#
List of property names to include in the response.
Limit#
Type: int
The maximum number of members to return.
Filter#
Type: FString
The filter to apply to the members.
Sort#
Type: FPubnubMemberSort
The sort order to apply to the members.
Page#
Type: FPubnubPage
Cursor-based pagination. Use Page.Next and Page.Prev to request the next or previous page.

Sample code​

Actor.h​


1

Actor.cpp​


1

Returns​

FOnPubnubRemoveChannelMembersResponse​
FieldTypeDescription
ResultFPubnubOperationResultThe result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
PageFPubnubPagePagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).
FOnPubnubRemoveChannelMembersResponseNative​
FieldTypeDescription
Resultconst FPubnubOperationResult&The result of the operation.
MembersDataconst TArray<FPubnubChannelMemberData>&Array of FPubnubChannelMemberData structs which are the members of the channel.
Pageconst FPubnubPage&Pagination cursor (Next, Prev) for requesting the next or previous page.
TotalCountintTotal number of members matching the request (when requested).

Other examples​

Remove channel members with result​
Actor.h​
1

Actor.cpp​
1

Remove channel members with lambda​
Actor.h​
1

Actor.cpp​
1

Remove channel members raw​
Actor.h​
1

Actor.cpp​
1

Complete example​

ASample_AppContextFull.h​

1

ASample_AppContextFull.cpp​

1

Was this page useful?

Last updated on