> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# User Engagement Extensions

> Flutter SDK implementation examples for User Engagement extensions including Giphy, Message Translation, Polls, Reminders, Stickers, Stipop, and Tenor

This page contains Flutter SDK code examples for User Engagement extensions. For feature documentation, setup instructions, and extension settings, see [User Engagement Extensions](/fundamentals/extensions-user-engagement).

## How to Use Extensions with SDK

<Steps>
  <Step title="Enable in Dashboard">
    Login to [CometChat Dashboard](https://app.cometchat.com/login), select your app, then go to **Chat & Messaging → Features** and enable the extension.
  </Step>

  <Step title="Configure settings (if required)">
    Some extensions require API keys or additional configuration. Open the extension settings in the Dashboard.
  </Step>

  <Step title="Implement SDK methods">
    Use the code examples below to call extension APIs and extract extension data from messages.
  </Step>

  <Step title="Build your UI">
    Create UI components to display extension data (e.g., polls, stickers, GIFs).
  </Step>
</Steps>

***

## Giphy

Add GIFs from Giphy to your conversations.

### Get Trending GIFs

```dart theme={null}
String url = '/v1/trending?offset=1&limit=15';

CometChat.callExtension('gifs-giphy', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // GIFs data from Giphy
    debugPrint('Trending GIFs: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Search for GIFs

```dart theme={null}
String query = 'awesome';
String url = '/v1/search?offset=1&limit=15&query=$query';

CometChat.callExtension('gifs-giphy', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // GIFs data from Giphy
    debugPrint('Search GIFs: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Message Translation

Translate messages into 70+ languages.

### Translate Message

```dart theme={null}
Map<String, dynamic> body = {
  'msgId': 12,
  'text': 'Hey there! How are you?',
  'languages': ['ru', 'hi', 'mr'],
};

CometChat.callExtension('message-translation', 'POST', '/v2/translate', body,
  onSuccess: (Map<String, dynamic> response) {
    // Result of translations
    debugPrint('Translations: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Polls

Create and vote on polls in conversations.

### Creating a Poll

```dart theme={null}
Map<String, dynamic> body = {
  'question': 'Which OS do you use?',
  'options': ['Windows', 'Ubuntu', 'MacOS', 'Other'],
  'receiver': 'cometchat-uid-1',
  'receiverType': 'user',
};

CometChat.callExtension('polls', 'POST', '/v2/create', body,
  onSuccess: (Map<String, dynamic> response) {
    // Details about the created poll
    debugPrint('Poll created: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Voting in a Poll

```dart theme={null}
Map<String, dynamic> body = {
  'vote': '3',
  'id': 'd5441d53-c191-4696-9e92-e4d79da7463',
};

CometChat.callExtension('polls', 'POST', '/v2/vote', body,
  onSuccess: (Map<String, dynamic> response) {
    debugPrint('Vote submitted successfully');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Getting Results

```dart theme={null}
String pollId = 'd5441d53-c191-4696-9e92-e4d79da7463';
String url = '/v2/results?id=$pollId';

CometChat.callExtension('polls', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // Poll results
    debugPrint('Poll results: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Reminders

Set reminders for messages or custom events.

### Set Message Reminders

```dart theme={null}
Map<String, dynamic> body = {
  'about': 1,
  'isCustom': false,
  'timeInMS': 1638351344989,
};

CometChat.callExtension('reminders', 'POST', '/v1/reminder', body,
  onSuccess: (Map<String, dynamic> response) {
    debugPrint('Reminder created successfully');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Set Personal Reminders

```dart theme={null}
Map<String, dynamic> body = {
  'about': 'Drinking water',
  'isCustom': true,
  'timeInMS': 1638351344989,
};

CometChat.callExtension('reminders', 'POST', '/v1/reminder', body,
  onSuccess: (Map<String, dynamic> response) {
    debugPrint('Personal reminder created successfully');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### List Reminders

```dart theme={null}
CometChat.callExtension('reminders', 'GET', '/v1/fetch', null,
  onSuccess: (Map<String, dynamic> response) {
    var reminders = response['reminders'];
    debugPrint('Reminders: $reminders');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Delete Reminders

```dart theme={null}
Map<String, dynamic> body = {
  'reminderId': 'e9cda52a-3839-4fd5-a010-b70db136f0f1',
};

CometChat.callExtension('reminders', 'DELETE', '/v1/reminder', body,
  onSuccess: (Map<String, dynamic> response) {
    debugPrint('Reminder deleted successfully');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Stickers

Load and send stickers in conversations.

### Loading Stickers

```dart theme={null}
CometChat.callExtension('stickers', 'GET', '/v1/fetch', null,
  onSuccess: (Map<String, dynamic> response) {
    // Stickers received
    debugPrint('Stickers: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Stipop

Access Stipop's sticker platform.

### Get Trending Stickers

```dart theme={null}
String lang = 'en';
int limit = 20;
int pageNumber = 1;
String countryCode = 'US';
String url = '/v1/trending?lang=$lang&limit=$limit&pageNumber=$pageNumber&countryCode=$countryCode';

CometChat.callExtension('stickers-stipop', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // Stickers in response
    debugPrint('Trending stickers: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Search for Stickers

```dart theme={null}
String lang = 'en';
int limit = 20;
int pageNumber = 1;
String query = 'happy';
String url = '/v1/search?lang=$lang&limit=$limit&pageNumber=$pageNumber&query=$query';

CometChat.callExtension('stickers-stipop', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // Stickers in response
    debugPrint('Search stickers: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

***

## Tenor

Add GIFs from Tenor to your conversations.

### Get Trending GIFs

```dart theme={null}
String url = '/v1/trending?offset=1&limit=15';

CometChat.callExtension('gifs-tenor', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // GIFs data from Tenor
    debugPrint('Trending GIFs: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```

### Search for GIFs

```dart theme={null}
String query = 'awesome';
String url = '/v1/search?offset=1&limit=15&query=$query';

CometChat.callExtension('gifs-tenor', 'GET', url, null,
  onSuccess: (Map<String, dynamic> response) {
    // GIFs data from Tenor
    debugPrint('Search GIFs: $response');
  },
  onError: (CometChatException e) {
    debugPrint('Error: ${e.message}');
  }
);
```
