Feature description
Our IM service has a built-in, ready-to-use sensitive word filter. This guide shows you how to set it up yourself in the Developer Console. We currently support Chinese, Japanese, German, numbers, English, Russian, Korean, and Arabic.
The sensitive word filter is a basic protection mechanism and is limited to text content (50 words by default). It is not a substitute for a professional content moderation service.
Instructions
Go to the Console > Security & Moderation page to:
- Add or remove sensitive words.
- Control the action for each word: block the message or replace the characters.
- Export your list of sensitive words.
- Add custom message types that you want to filter. (By default, filtering only applies to RongCloud’s built-in text message type,
RC:TxtMsg
).
Click Add and use the tabs to add sensitive words.
Related scenarios
Notify senders when their message is blocked
If a message is blocked because of a sensitive word, the sender isn’t notified by default. If you want them to be notified, enable Notify sender of filtered content on the Basic features page and set up a listener on the client (requires Android/iOS SDK v5.1.4+ or Web SDK v5.0.2+).
For details, see the “Sensitive Information Block Notification Callback” guide for each client:
Enable filtering for messages sent from your server
By default, messages sent using the Server API are not filtered. If you need this, turn on Filter server API messages in Basic features in the Developer Console.
Filter sensitive words in custom messages
On the Security & Moderation page, click Set custom message. Provide the ObjectName
for your custom message type and the key for the content field in the message’s JSON structure. After you set this up, we’ll filter the value of that key for sensitive words.
About message object names:
- The content corresponding to the key for all
ObjectName
s you add will be filtered. For example, theObjectName
for RongCloud’s built-in text message isRC:TxtMsg
. The value of thecontent
key in its message body will be automatically filtered. - Make sure your custom messages are structured according to the SDK standards and are valid JSON.
- Don’t start your
ObjectName
s with “RC:” to avoid conflicts with our built-in system message names.
Increase the sensitive word limit
Increasing the sensitive word limit is a paid service. By default, you can configure 50 sensitive words. If you need more, you can increase the limit yourself on the Extended services tab of the Chat pricing plans page in the Developer Console.
Questions? Open a ticket.