EN
My account

Your privacy, your call. No advertising cookies. May we count your visit in aggregate (Cloudflare, no cookies) and remember where you came from? If you reject, we won’t measure your visit. · Cookies · Privacy

Privacy settings

Choose what we measure and what we keep in this browser. We never sell or share your data.

Essential

Remember your theme, language, saved items and this choice. Without them the site cannot work the way you ask.

Always on

Keeps the source of your first and latest visit for 90 days (utm parameters and referring site). It only leaves your browser if you subscribe to the newsletter.

Cloudflare Web Analytics counts visits in aggregate: page, referring site, country, browser and load times. No cookies, no identifiers and no profiling; nothing is stored in your browser. It only loads if you accept it. If you reject it or switch it off, it does not load (or stops loading from the next page) and we do not count your Telegram clicks either.

Cookies · Privacy

Configurations · Level intermediate

Configuration: OpenClaw on WhatsApp just for you

In 30 seconds

A copyable recipe so your OpenClaw assistant on WhatsApp only serves your number and, in groups, only replies when mentioned. With explanation and security audit.

Start with:

By Cognenza editorial team · Updated · 2 min read · Sources cited

In this guide · 7
  1. What it’s for
  2. The recipe
  3. Line by line
  4. Check the security
  5. Precautions
  6. Frequently asked questions
  7. Sources

What it’s for

When you connect OpenClaw to WhatsApp, anyone who has that number could try to message your assistant. This recipe, based on the official example, makes sure only your number can give it orders and that in groups it only replies when mentioned.

The recipe

File ~/.openclaw/openclaw.json:

{
  channels: {
    whatsapp: {
      allowFrom: ["+15555550123"],
      groups: { "*": { requireMention: true } },
    },
  },
  messages: { groupChat: { mentionPatterns: ["@openclaw"] } },
}

Line by line

Line by line
LineWhat it does
allowFromList of authorised numbers. Replace the example with yours
groups: { "*": ... }Applies the rule to all groups
requireMention: trueIn groups, only replies when mentioned
mentionPatternsWhich text counts as a mention (here, @openclaw)

The format is JSON5: unlike strict JSON, it allows comments and trailing commas.

Check the security

openclaw security audit

According to the documentation, it reviews settings that drift from the safe configuration. Also, keep the Gateway listening only on your computer (the default) and don’t publish it on the internet without authentication.

Precautions

  • A Gateway is one circle of trust: don’t share it with people you don’t fully trust.
  • Even your authorised contacts shouldn’t send it links or files of doubtful origin: they can contain prompt injection.

Frequently asked questions

What happens if someone else messages the assistant?

With allowFrom, only numbers on the list are accepted. Without a list, the documentation says most channels reply to the stranger with a pairing code and don’t process their message.

And in groups?

With requireMention: true, the assistant only replies in a group when someone mentions it with one of the patterns you configure.

Can I add several numbers?

Yes, as a list: ["+44...", "+44..."]. Remember that all those people will be able to give orders to your assistant.

Glossary · Configurations

Keep reading

Next step · Tools

OpenClaw: guide

A guide to OpenClaw, the open-source AI assistant that runs on your own computer and replies from your messaging apps: requirements, installation, safe configuration and limits.

Safety and good use

AI agents: real risks

What changes when an AI doesn’t just answer but acts: files, commands, browser and messages. The risks documented by the projects themselves (prompt injection, permissions, keys) and a checklist.

Sources

Source titles are translated by Cognenza. Links go to the official page in your language when there is one; otherwise, to the English or Spanish original.

  1. OpenClaw official documentation (configuration) — OpenClaw Foundation
  2. Gateway security — OpenClaw Foundation

Change log

Change log
  • : First published, based on the official configuration example.

Educational content, prepared with the help of AI tools, with sources cited. It is not a substitute for professional advice. Tools change fast: if you spot something out of date, write to us at contacto@cognenza.com. How we work.

Found this guide useful? A new guide in your inbox every Tuesday

Every Tuesday, 5 minutes: AI news with sources, a tool with its prompt and a guide. Free, with one-click unsubscribe. What is inside and a sample issue