ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

telegram-pairing-customization

Modify OpenClaw's Telegram pairing logic so unapproved users receive pairing codes on every /start message before approval. Use when users need to repeatedly access pairing codes after the initial request, ensuring consistent access to pairing instructions even if the initial code was missed or lost.

Why use this skill?

Learn how to modify OpenClaw to display persistent Telegram pairing codes, improving onboarding flow and user experience for pending users.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/crazypeace/telegram-pairing-customization
Or

What This Skill Does

This skill provides a surgical modification to the core OpenClaw Telegram authentication workflow. By default, OpenClaw only displays the pairing code and authentication instructions to a user upon their very first interaction with the bot (the initial /start command). If the user clears their chat history, ignores the message, or simply loses track of the pairing code, they become effectively "locked out" of the onboarding process, requiring an administrator to manually intervene or debug the session state.

By implementing this customization, you change the logic from checking if a pairing request was "just created" to checking if a "valid pairing code exists" for the user. This ensures that every time a pending user sends the /start command, the bot will re-dispatch the pairing code and the specific CLI command needed to approve them. It essentially turns the static initial response into a persistent, helpful onboarding loop.

Installation

  1. Locate your OpenClaw installation directory, typically found at /usr/lib/node_modules/openclaw/.
  2. Use grep -r "Ask the bot owner to approve with:" . to find the exact file containing the pairing logic.
  3. Back up the target file before proceeding with any modifications.
  4. Open the file in your preferred text editor (e.g., nano or vim).
  5. Locate the code block checking if (created).
  6. Replace the created condition with code. Ensure the syntax matches the provided snippet in the implementation guide.
  7. Save the file and execute openclaw gateway restart to apply the changes to the running environment.

Use Cases

  • High-Friction Onboarding: In environments where users are technically inexperienced and often misplace instructions, this keeps the onboarding path clear and accessible.
  • Support Reduction: Reduces the number of "I lost my code" support tickets administrators receive, as the bot becomes self-service regarding pairing status.
  • Testing Environments: During development or testing phases where pairing and unpairing occur frequently, this provides immediate feedback without needing to reset the database state.

Example Prompts

  • "OpenClaw, I cannot find my Telegram pairing code. Can you show it to me again?"
  • "I am trying to join the bot, but I closed the first message. What is the command to get my pairing code back?"
  • "I'm stuck at the authentication step; can you re-send the pairing instructions?"

Tips & Limitations

  • Persistence: This change is applied to the application code. If you perform an npm update or openclaw update, your changes may be overwritten. Keep a copy of your patch or use a patching tool to re-apply it after updates.
  • Permissions: Ensure you are editing files with appropriate user permissions (e.g., sudo), as node_modules directories are often owned by root or a specific system service user.
  • Verification: Always test the change by using a secondary Telegram account that has not been approved yet to verify that the /start command now triggers the expected response loop.

Metadata

Stars3409
Views0
Updated2026-03-25
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-crazypeace-telegram-pairing-customization": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#telegram#auth#onboarding#openclaw#customization
Safety Score: 3/5

Flags: file-read, file-write