Skip to content

Manage group chat metadata

Group chats can have metadata, like names, descriptions, and images. Metadata can help users more easily identify their group chats. You can set group chat metadata when creating a group chat, and get and update metadata using these methods.

Updatable group chat metadata

The following group chat metadata can be updated:

  • group_name: The name of the group chat
  • description: A description of the group chat
  • image_url: A URL pointing to an image for the group chat
  • app_data: Custom app-specific data for the group chat
  • disappearing_message_settings: Settings for disappearing messages in the group chat. To learn more about disappearing messages, see Support disappearing messages

Get a group chat name

Browser
const groupName = group.name;

Update a group chat name

Browser
await group.updateName('New Group Name');

Get a group chat description

Browser
const groupDescription = group.description;

Update a group chat description

Browser
await group.updateDescription('New Group Description');

Get a group chat image URL

Browser
const groupImageUrl = group.imageUrl;

Update a group chat image URL

Browser
await group.updateImageUrl('newurl.com');

Get group app data

App data is custom app-specific data that can be stored with a group. This allows your app to store additional metadata or settings for groups.

React Native
const appData = await group.appData();

Update group app data

Update the custom application-specific data for a group. The data is stored as a string, so you'll need to serialize any objects (e.g., using JSON.stringify).

React Native
const customData = JSON.stringify({
  theme: 'dark',
  settings: { notifications: true },
});
await group.updateAppData(customData);