Classroom / 4. Connection

Pairing Security

The Unlock Key

Just because your bot is online doesn't mean it talks to strangers.

The Pairing Flow

  1. You DM the bot: "Hello!"
  2. Bot (Ignored): Checks allowlist. You are unknown.
  3. Bot: "Pairing Code: 123-ABC"
  4. You (Terminal): moltbot pairing approve telegram 123-ABC
  5. Bot: "Identity Verified. Hello Operator."

This prevents random people from using your API credits.

Knowledge Check

What must you do when DMing your bot for the first time?