Token, allowlist e requireMention
Combini token, allowlist allowFrom e requireMention nei gruppi per controllare chi può raggiungere il Suo assistente.
Token, allowlist e requireMention è una lezione OpenClaw Academy gratuita su CoddyKit. Questa è la lezione 2 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento OpenClaw Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso OpenClaw Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
Three Tools, One Goal
To control who reaches your assistant, you combine three things: tokens, allowlists, and required mentions. Together they form your front line. 🔐
What Tokens Do
A token is a secret that proves a channel or client is allowed to connect to your Gateway. Keep it private, like a house key.
The allowFrom Allowlist
The allowFrom key lists exactly which senders may message OpenClaw on a channel. Anyone not listed is simply ignored.
Allowlist In Config
You set allowFrom inside your channel block. Here a WhatsApp channel only accepts one number, shown in JSON5 config.
{
channels: {
whatsapp: {
allowFrom: ["+15555550123"]
}
}
}Where It Lives
That config sits in ~/.openclaw/openclaw.json. Edit it, and OpenClaw enforces your allowlist the next time it handles messages.
requireMention In Groups
For group chats, requireMention tells OpenClaw to stay quiet unless it is explicitly mentioned, so it never reacts to every message.
requireMention Example
Apply requireMention to all groups with a wildcard so the assistant only speaks when called by name.
{
channels: {
whatsapp: {
groups: { "*": { requireMention: true } }
}
}
}Mention Patterns
Define how to call it with mentionPatterns, like @openclaw. Only messages matching a pattern count as a real mention.
{
messages: {
groupChat: { mentionPatterns: ["@openclaw"] }
}
}Layer Them Together
Each control closes a different gap. Layering tokens, allowFrom, and requireMention is far safer than relying on any single one.
Tokens For Channels
Tokens authenticate the channel connection itself, while allowFrom decides which people behind that channel are trusted to send commands.
Start Strict
A safe habit is to start strict: empty allowlists, mentions required, then add only the senders you truly need over time.
Quick Check
Match each control to what it actually limits.
Recap
Use tokens to authenticate channels, allowFrom to allow senders, and requireMention plus mentionPatterns to stay quiet until called. ✅
Impara Bash con un tutor IA — gratis
Scrivi ed esegui vero codice nel tuo browser, ricevi aiuto istantaneo da un tutor IA disponibile 24/7, e riprendi da dove hai lasciato sul web o nell'app.
- Corsi
- 10
- Lezioni
- 40
Domande Frequenti
La lezione «Token, allowlist e requireMention» è gratuita?
Sì — il testo completo di «Token, allowlist e requireMention» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso OpenClaw Academy, passa a CoddyKit PRO. Il corso OpenClaw Academy include 4 lezioni in totale.
Cosa imparerò in «Token, allowlist e requireMention»?
Combini token, allowlist allowFrom e requireMention nei gruppi per controllare chi può raggiungere il Suo assistente. Eserciti OpenClaw Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare OpenClaw Academy?
Non è richiesta alcuna esperienza precedente. OpenClaw Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 2 di 4.
Quanto tempo richiede la lezione «Token, allowlist e requireMention»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione OpenClaw Academy?
Sì. Ogni lezione OpenClaw Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Perché i guardrail sono importanti
- Token, allowlist e requireMention
- La documentazione sulla sicurezza del Gateway
- Accesso remoto tramite SSH e Tailscale