Moderation and analytics
Moderate interactions between users and view their chat activity
TalkJS gives you full visibility and control over user communications. Use moderation tools and the REST API to review chats, remove unwanted content, and gain insights into engagement across your platform.
<?php
use LcobucciJWTEncodingChainedFormatter;
use LcobucciJWTEncodingJoseEncoder;
use LcobucciJWTSignerKeyInMemory;
use LcobucciJWTSignerHmacSha256;
use LcobucciJWTTokenBuilder;
require 'vendor/autoload.php';
$tokenBuilder = new Builder(new JoseEncoder(), ChainedFormatter::default());
$algorithm = new Sha256();
$signingKey = InMemory::plainText("<SECRET_KEY>_GOES_HERE_REPLACING_THIS_TEXT");
$now = new DateTimeImmutable();
$token = $tokenBuilder
->withClaim('tokenType', 'app')
->issuedBy('<APP_ID>')
->expiresAt($now->modify('+30 seconds'))
->getToken($algorithm, $signingKey)
->toString();
echo $token;
Safeguard messages with chat moderation tools
TalkJS provides built-in tools to monitor chat activity and moderate user messages in real time. When you need more flexibility, the REST API lets you take full control of user actions and message data.
See who’s chatting and review messages directly in the TalkJS Dashboard. Stay in control of every conversation so you can step in when needed and remove messages if required.
Prevent users from sharing email addresses, phone numbers, or links. You can fine-tune your settings to allow specific exceptions where needed.
Use analytics to understand how people interact in chat over time. Track active users, total messages sent, and engagement trends to gain deeper insight into platform activity.
Block specific words or phrases to maintain a positive environment. Customize your blocklists to fit your community standards and keep messages appropriate.
Content moderation in TalkJS
TalkJS filters messages before anyone reads them, helps you deal with messages after they're sent, and lets you limit or ban users who break your rules.
- Forbidden words, replaced with "(hidden information)" or your own text
- Custom patterns as regular expressions, with exceptions
- Hidden emails, phone numbers and links, which you can show again for chosen participants
- Spam controls for links, mentions and all-caps messages
- A custom "Report" action so users can flag a message
- Warnings you send as system messages
- Edit or delete any message with the REST API
- Review, export or delete any conversation in the dashboard
- Your own AI or image moderation, connected through webhooks
- A moderator role that can remove messages
- A visitor role that can only read and react
- Read-only access, for example as a cool-down
- Bans from every conversation with the REST API
Filter offensive or unwanted language to keep conversations respectful and safe.
Track individual chats in real time to keep discussions on topic and within guidelines.
Review chat activity over specific periods to understand engagement patterns and growth.
FreeUp streamlines chat moderation and insights with TalkJS
Discover how FreeUp uses TalkJS to monitor and manage thousands of client and freelancer conversations. With analytics and moderation tools, their team can easily track interactions and gain a clear overview of activity across the platform.
Read the full case studyUsing the REST API for moderation
With the REST API developers can edit or delete messages, which can help to remove unwanted content.
Using webhooks, it's possible to receive updates when a user posts a message, which you could use to keep some internal moderation tool up to date, or to pass them to a 3rd party app for spam content detection.
curl --request PUT
--url https://api.talkjs.com/v1/APP_ID/conversations/CONVERSATION_ID/messages/MESSAGE_ID
--header 'Authorization: Bearer YOUR_SECRET_KEY'
--header 'Content-Type: application/json'
--data '{"text": "(Message removed by moderator)"}'We chose TalkJS because it aligned well with our usage, as we have a large number of users but low usage per user.