User Authentication

Enforce a whitelist of Telegram user IDs for bot commands and callback queries.

1|1|Updated Mar 22, 2025
One-click install
npx skills add https://github.com/lipnelz/robbi --skill user-authentication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: User Authentication
Source: https://github.com/lipnelz/robbi/tree/main/.github/skills/authentication
Command: npx skills add https://github.com/lipnelz/robbi --skill user-authentication

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill ensures that only authorized users can interact with the bot's functionalities, preventing unauthorized access and maintaining control over bot operations.

Core Features & Use Cases

  • Access Control: Restricts bot usage to a predefined list of Telegram user IDs.
  • Layered Security: Implements authentication checks for both direct command handlers and callback queries.
  • Use Case: A bot managing sensitive server operations should only be usable by the system administrator, preventing accidental or malicious commands from being executed by others.

Quick Start

Ensure your Telegram ID is listed in topology.json to access bot commands.

Frequently Asked Questions about User Authentication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restrict Telegram bot access to a whitelist of specific user IDs?

Whitelist-based authentication for a Telegram bot involves storing allowed user IDs in a configuration file and checking them before processing commands. This prevents unauthorized access to sensitive bot operations.

How do I secure bot callback queries and direct commands against unauthorized users?

Securing callback queries and direct commands requires implementing layered authentication checks within conversation handlers. You apply access control checks to both command handlers and callback queries to block unauthorized interactions.

Can I use Python decorators to manage user authorization for a Telegram bot?

Yes, you can use Python decorators to manage user authorization for a Telegram bot. Decorators wrap your command handlers to automatically verify if a user's ID exists in the allowed whitelist before executing bot functions.

Do I need to manually add my Telegram ID to a file to enable bot access control?

Yes, you need to manually add your Telegram ID to the topology.json file to enable bot access control. The bot relies on this predefined list of user IDs to authenticate and permit interaction with its commands.

When do I need user authentication for my Telegram bot?

You need user authentication for your Telegram bot when it manages sensitive operations, such as server administration. Authentication prevents accidental or malicious commands from being executed by unauthorized personnel.